Redirect page

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

Redirect page

Postby loopin3 » 14. May 2012 09:10

HI all ,
i have a problem with xampp on windows XP SP3...
My xampp work for a index.html ( the root doc is default directory) with a few link to other page and it is a simple page in html language ( the root doc is default directory) .. when i surf my webserver http//ip-address/ my broswer go to http//ip-address/xampp with 403 error , i want redirect this page to my index.html.. how can i change this configuration????
Can we help me???

Tank you and sorry for my english...
Posts: 1
Joined: 14. May 2012 09:05
Operating System: Windows XP

Re: Redirect page

Postby JonB » 14. May 2012 22:16

Hello -

this is due to an Apache Module and the Directive values it is configured with

The Module is dir_module.

Look for this (probably in your \xampp\apache\conf\httpd.conf file):

Code: Select all
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
<IfModule dir_module>
    DirectoryIndex index.php index.cgi index.asp index.shtml index.html index.htm \
                   default.php default.cgi default.asp default.shtml default.html default.htm \
                   home.php home.cgi home.asp home.shtml home.html home.htm

This tells Apache what file to serve if a Directory Index is requested (that is what happens when you do not specify a specific page by its URL.)

Since index.php comes before index.html, the index.php (which is a redirect to /htdocs/xampp/index.php) is served. Change the DirectoryIndex line so index.html is BEFORE index.php, save the file and restart Apache.

Code: Select all
 DirectoryIndex index.html index.php index.cgi index.asp index.shtml index.htm \

Now Apache should serve your index.html file when you point your browser to http://localhost/ :D

You can also change that directive with a .htaccess file on a directory by directory basis, or by specifying the values in a 'Directory' directive. Apache usually has many ways to do the same thing. ... #directory

You could also delete \xampp\htdocs\index.php OR rename it to a different value. BUT then you would not know why this works...

Good Luck
User avatar
AF Moderator
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 48 guests