6

I just installed XAMPP for windows 7, control panel seems to work fine, I started MySql and Apache, the problem I have is, when I type localhost in my browser "Google Chrome" it sends me to "http://localhost/dashboard/"

when I change the url to "//localhost/xampp/index.php", it tells me: "Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404

localhost Apache/2.4.16 (Win32) OpenSSL/1.0.1p PHP/5.6.11"

anyone can helps me out with this? Thanks.

S.Joe
  • 77
  • 1
  • 1
  • 6

3 Answers3

3

Ok, Create a page yourpage.html / yourpage.php whatever, you have to put all your pages in a folder in C:\Xampp\htdocs\ dir

Then try accessing following url:

localhost/yourpage.html

or

localhost/yourpage.php

That should work.

Sumeet Gavhale
  • 800
  • 4
  • 13
  • 39
  • I understand what you are trying to tells me, however I don't want to make a website yet, i want to access the main page of the xampp, which i can add a password and stuff like that – S.Joe Aug 18 '15 at 05:31
  • Any solution? I deleted unintentionally the xampp index file and now I need to go there. – Román Mar 31 '20 at 13:58
1

I think you should be entering "http://localhost/index.php", because there is no such file in my ../htdocs/xampp/ folder called as index.php.

So may be the file you are referring to is in ../htdocs/index.php and to access it you need to hit the url as "http://localhost/index.php".

Thanks.

1

In Xampp the default page will redirect you to /Dashboard Folder because it is sending the header Location:http://localhost:80/Dashboard to browser and browser understands that and redirects it.

The answer by @Sumeet Gavhale is correct. And instead of C://Xampp/htdocs folder xampp use to host contents inside /htdocs folder so if you want to find C://Xampp/htdocs/index.php type localhost/index.php (but that will redirect you to /htdocs/Dashboard folder).

If you want to change the hosting folder you should edit the Apache http/https configuration file (but that depends on your OS and file system).

Note : The Default Page Word referred in second line of this answer means the document's name in the default documents in your Server (xampp in your case) (for eg: index.htm ,index.html , index.php etc). Will be loaded in your server and will be different in other's case (if they have done that) (index.php in first case (if not edited)).

Index.php Of Xampp's Source Code

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

But if you still want to view (execute) the page enter "//" in front of last and second last line.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • 1
    It would be helpful to know why the index.php request is doing the redirect. Is it the contents of the index.php file? Or is it something at a higher level (like apache config) that is doing the redirect. – Jeff Richards Aug 07 '21 at 14:58
  • @JeffRichards Thank you for Improvement i Have Posted the Index.php file – Devanshu Sharma Aug 09 '21 at 10:31