Link to home
Start Free TrialLog in
Avatar of badwolfff
badwolfffFlag for United Kingdom of Great Britain and Northern Ireland

asked on

On WAMP I need to redict each url specified in hosts file to a different localhost subfolder. How do I do it?

Hi all,

I use WAMP on Windows 7. In my localhost folder I have serveral sites and I would like to set several urls in the /etc/hosts file to ridirect me to different localhost folders.

Eg. I have already set the domain "www.mysite.com" to 127.0.0.1 in the hosts file.
Now when I type "http://www.mysite.com" I get redirected to the main localhost index/welcome page of WAMP.
However I have a folder called "mysite" and I would like to be redirected to that folder and not the localhost root.
I tried to edit the httpd.conf file by adding
Redirect permanent /mysite http://www.mysite.com
But this does not seem to work. I have also restarted wamp several times after having made this change.
Under my Apache the mod_alias is already on.

Could anyone suggest a working solution?

I have several sites and I need each one to be redirected to a localhost subfolder.

thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of badwolfff
badwolfff
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of badwolfff

ASKER

I found the answer myself.