how do i change the default page?

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

how do i change the default page?

Postby glock18forlife » 20. May 2007 08:16

I've already tried messing with the virtual hosts and it didn't work out for me.

Id like to be able to set "http://localhost/phpbb2/" or any other html page i make as the default page when you type in http://"ip-adress" instead of having the xampp page come up.

All and any help appreciated.
glock18forlife
 
Posts: 2
Joined: 20. May 2007 08:12

Postby Wiedmann » 20. May 2007 10:00

to set "http://localhost/phpbb2/"

Put the phpBB files into the directory "\xampp\htdocs\phpbb2" (create first this directory).

as the default page when you type in http://"ip-adress"

With this URI you must put the html files from your default page into the directory "\xampp\htdocs" (delete first the existing files in this directory).
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby glock18forlife » 20. May 2007 20:17

Thank you very much!
glock18forlife
 
Posts: 2
Joined: 20. May 2007 08:12

Postby DigitalDeath, » 30. May 2007 16:32

and also if u want it just to be http://IPADDRESS/ go into htdocs and open index.php and you will see this:

Code: Select all
<?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 :-(


Change it to:

Code: Select all
<?php
   if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
      $uri = 'https://';
   } else {
      $uri = 'http://';
   }
   $uri .= $_SERVER['HTTP_HOST'];
   header('Location: '.$uri.'/phpbb2/');
   exit;
?>
Something is wrong with the XAMPP installation :-(
DigitalDeath,
 
Posts: 3
Joined: 30. May 2007 16:21

Postby Codesmith » 02. June 2007 19:45

If you don't specify a file, the server will look for an file named index in the specified directory and server that page.

So you can also simply replace the index.php file with your sites homepage.
Codesmith
 
Posts: 101
Joined: 31. March 2007 21:11


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 38 guests