Sign in to follow this  
Followers 0
Famicoman

XAMPP Configuration

3 posts in this topic

I recently threw xampp onto my server because everyone likes Apace, and I wanted to check it out to see if I prefered it over Abyss. I have successfully changed my port, and got it all configured nicely except for one thing. Whenever I want to go to:

http://localhost

it always redirects to:

http://localhost/xampp/

I want to get rid of that part, so it just goes to the main page in the htdocs folder. I have scowered the Config file, but have not found where to edit this part out. Any help would be appreciated.

Edited by Famicoman
0

Share this post


Link to post
Share on other sites

I was bored so I installed XAMPP just for you. :lol:

XAMPP default install dir is: %ProgramFiles%\xampp\

The xampp default Apache dir is %ProgramFiles%\xampp\apache\

The xampp default Apache config is %ProgramFiles%\xampp\apache\conf\httpd.conf

The xampp default Apache config also references an additional xampp config: %ProgramFiles%\xampp\apache\conf\extras\httpd-xampp.conf

The xampp default Apache DocumentRoot is %ProgramFiles%/xampp/htdocs

Within the htdocs folder are 2 files of interest to you:

index.html & index.php

The index.html displays simply 'It works!' while the php file:

<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/xampp/');
exit;
?>

As you can see, redirects your request for localhost into localhost/xampp/,

\%ProgramFiles%\xampp\htdocs\xampp\index.php

The easiest way to fix this is to just rename the htdocs\index.php to htdocs\index.php.x and your index.html will take precidence. :)

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0