Xampp keeps redirecting me to /xampp!!

Soldato
Joined
2 May 2004
Posts
19,950
Hi,

I've been playing with Ubuntu on my other PC and decided to install XAMPP on it.

The only problem is the thing keeps on redirecting me to http://localhost/xampp/

I have checked in httpd.conf but can't fins anything in there that tells it to go to /xampp/.

Any ideas please?

Thanks,
Craig.
 
open the htdocs folder and remove index.php, as it contains:

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


;)
 
Pho said:
open the htdocs folder and remove index.php, as it contains:

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


;)

/opt/lampp/htdocs/index.php not there :(

There was an index.html or some kind of index, but I deleted it as soon as I noticed I was being redirected.

EDIT

If I access http://localhost/ from the server PC it's fine, it doesn't redirect me.

But if I access http://192.168.1.38/ from another PC is redirects me :(
 
Last edited:
Ah, I thought it would be the same as on Windows :(.

What about a .htaccess file?
 
In that case, just do what I do. Create a files folder in htdocs and put all your stuff in there. Instant fix :p
 
Pho said:
In that case, just do what I do. Create a files folder in htdocs and put all your stuff in there. Instant fix :p

As in change the webserver root dir from /opt/lampp/htdocs to /opt/lampp/htdocs/files ??

EDIT

I'd really like to figure out what's making it redirect like this. If I access the webserver using http://127.0.0.1 or http://192.168.1.38 or http://computername on Ubuntu then it doesn't redirect me, it just shows me the directory listing.

But, if I access the server from another computer it redirects me to /xampp for some reason.

EDIT

Could it be something to do with one of the other conf files? The ones in /opt/lampp/etc/extra?

Thanks,
Craig.
 
Last edited:
Back
Top Bottom