deleted index.php from htdocs (win7) 1.7.7 [SOLVED]

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

deleted index.php from htdocs (win7) 1.7.7 [SOLVED]

Postby harryhere » 06. November 2011 12:28

accidental deletion of index.php from xampp/htdocs..

although i can't find problem with that but , as i have deleted it, i really want it back

i don't have windows backups

can somebody get me the code..
harryhere
 
Posts: 1
Joined: 06. November 2011 12:23
Operating System: windows 7

Re: accidental deletion of index.php from xampp/htdocs..

Postby Sharley » 06. November 2011 12:32

harryhere wrote:can somebody get me the code..
...please. :shock:


You can still access http://localhost/xampp without the index.php which is what the index.php does.

Here is the code and as you can see it is only a redirect
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 :-(
Best practice is to backup the xampp folder as quite often things go wrong with files in this folder. ;)

You could also download the zip or 7zip version as a backup for lost or damaged files.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 215 guests