0
<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.

4
  • This is not the way WordPress or Apache Virtual Hosts work. If you want to change the way WordPress works, try the WordPress website re Force Login
    – RiggsFolly
    Commented Aug 3, 2015 at 16:23
  • @RiggsFolly my question is not about wordpress my question is about how to make customisable urls that link to a specific file and what is above is only but an example > Sorry for the confusion! and i think this is exactly what Apache Virtual Hosts is supposed to do
    – Tryhard
    Commented Aug 3, 2015 at 16:36
  • @RiggsFolly Can you check your wamp forum messages
    – Tryhard
    Commented Aug 3, 2015 at 17:16
  • @RiggsFolly sorry can you come back?
    – Tryhard
    Commented Aug 3, 2015 at 17:24

1 Answer 1

0

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> 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.