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

Problems with the Windows version of XAMPP, questions, comments, and anything related.

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

Postby globex » 05. September 2011 22:25

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.
globex
 
Posts: 8
Joined: 17. October 2009 21:26

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

Postby Altrea » 05. September 2011 23:43

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.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

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

Postby globex » 06. September 2011 02:05

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.
globex
 
Posts: 8
Joined: 17. October 2009 21:26


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 99 guests