Page 1 of 1

Alias or Proxy or Rewrite to remove "localhost" from URL

PostPosted: 05. September 2011 22:25
by globex
Hey guys,

I'm trying to rewrite/proxy/alias (not sure which is the right term to use in this situation) the following XAMPP url:

http://localhost/test

to

http://test/

All my attempts of editing apache confs have failed. No matter what I do - when I try to go to http://test it will redirect to http://test/xampp and show a forbidden error.

Any help would be greatly appreciated.

Re: Alias or Proxy or Rewrite to remove "localhost" from URL

PostPosted: 05. September 2011 23:43
by Altrea
when I try to go to http://test it will redirect to http://test/xampp and show a forbidden error.

simply delete the index.php file in your htdocs folder.

Re: Alias or Proxy or Rewrite to remove "localhost" from URL

PostPosted: 06. September 2011 02:05
by globex
Thanks!

I added this to httpd.conf

Code: Select all
<VirtualHost test>
DocumentRoot C:\xampp\htdocs\test
ServerName test
</VirtualHost>


And removed index.php from C:\xampp\htdocs and it worked.