PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, September 21, 2022

[FIXED] how to have customisable wamp url

 September 21, 2022     virtualhost, wamp, wampserver, wordpress     No comments   

Issue

<VirtualHost *:80>
DocumentRoot "C:\wamp\www\TEST1\wordpress"
ServerName yg8i.tk
ServerAlias www.yg8i.tk
Options Indexes FollowSymLinks
<Directory  "C:\wamp\www\TEST1\wordpress">
    AllowOverride All
    Require all granted        
</Directory>
</VirtualHost>

but this will only give them my wordpress website and also if someone types www.yg8i.tk/whatever they will have access to my files. and i also want to have custom urls so for example i would like to type www.yg8i.tk/login to login to my wordpress site so my solution was

<VirtualHost *:80>
DocumentRoot "C:\wamp\www\TEST1\wordpress\wp-login.php"
ServerName yg8i.tk\login
ServerAlias www.yg8i.tk\login
Options Indexes FollowSymLinks
<Directory  "C:\wamp\www\TEST1\wordpress\wp-login.php">
    AllowOverride All
    Require all granted        
</Directory>
</VirtualHost> 

but it does not work i really need ur help.

I Hope You Help And Thank You In Advance.


Solution

Try changing to this, DocumentRoot and <Directory... can only have a directory as their value.

You can use the DocumentIndex to cause any other script to be launches

<VirtualHost *:80>
DocumentRoot "C:\wamp\www\TEST1\wordpress"
ServerName yg8i.tk\login
ServerAlias www.yg8i.tk\login
Options Indexes FollowSymLinks
DocumentIndex wp-login.php
<Directory  "C:\wamp\www\TEST1\wordpress">
    AllowOverride All
    Require all granted        
</Directory>
</VirtualHost> 


Answered By - RiggsFolly
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing