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.

5
  • where does your index.php reside? Commented Aug 18, 2015 at 5:26
  • Is there any index.php file in xampp directory ? Commented Aug 18, 2015 at 5:26
  • no, i really don't know where it is, I just watched a tutorial and he did this, but it's not working Commented Aug 18, 2015 at 5:28
  • some others told me to go here >> localhost/xampp/htdocs/index.php but it's not working too Commented Aug 18, 2015 at 5:29
  • it can also be index.html :), not necessary that it will only have index.php file in the xampp root folder Commented Aug 18, 2015 at 5:34

3 Answers 3

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.

Sign up to request clarification or add additional context in comments.

3 Comments

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
Any solution? I deleted unintentionally the xampp index file and now I need to go there.
I have proper configured XAMPP with its own website folder, but index.php is not accessible, instead it redirects me to the default XAMPP dashboard (called index.php?) for some reason index.php is not recognized for websites.
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.

Comments

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.

2 Comments

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.
@JeffRichards Thank you for Improvement i Have Posted the Index.php file

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.