32

I have just installed XAMPP on my machine, and when trying to access sub folders in htdocs I get the following error.

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.4 (Win32) OpenSSL/0.9.8y PHP/5.4.19"

What default security changes do I need to make in order to access child folders of htdocs? Thanks!

Community
  • 1
  • 1
crayden
  • 2,130
  • 6
  • 36
  • 65

15 Answers15

26
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.

You're having problem because the object really doesn't exist in your htdocs directory. You don't have to append xampp after localhost or 127.0.0.1 because xampp will treat it as an object or a folder under htdocs.

if you want to access your blog, make sure you have a blog folder under htdocs and put in your URL localhost/blog

Drixson Oseña
  • 3,631
  • 3
  • 23
  • 36
  • This is the exact opposite of the comment that apparently helped OP. But neither work for me, whether the folder is in xampp or just htdocs. – user124384 Jun 29 '15 at 18:31
  • This answer solved my problem. I placed my blog under `/var/www` or `/var/www/html` but neither of these worked. Placing it into the `/opt/lampp/htdocs` worked. – Jeyekomon Jun 09 '20 at 12:19
15

Just make sure you have the .htaccess in your project's public directory

If you don't have the file then create one and paste the below code in your .htaccess file.

Code:-

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>
Bibhudatta Sahoo
  • 4,808
  • 2
  • 27
  • 51
code-8
  • 54,650
  • 106
  • 352
  • 604
3

The issue is the object(project) folder and it is really not in the localhost.

Check the following things (Windows User)

1. project folder in htdocs

2. spelling of the project folder in htdocs C:\xampp\htdocs\projectname

3. Public folder inside project folder C:\xampp\htdocs\projectname\public

1

Drixson Oseña you are right but when you newly install xampp on your system "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.7 (Win32) OpenSSL/1.0.1e PHP/5.5.6"

However all folder in the htdocs but only open is that xampp website because of index.php error, so that's not a big deal just remove the index.html and index.php and try to open localhost again you'll be succeed.

1

well, i had a similar problem, so when i entered, lets say: localhost/test.php I would got Object not found warning! I solved my problem when i realized that windows changed my test.php into this test.php.txt. I changed my extension and voila! problem solved I could finaly acceses localhost/test.php.

stipe567
  • 11
  • 1
1

I had recently the same issue, It might not be the same as your case, but if anyone has a similar situation as mine, somehow I deleted the .htaccess file in the root of my app, so I copied it back from a backup and it worked

medBouzid
  • 7,484
  • 10
  • 56
  • 86
0

Agree @Drixson Oseña: You should not write localhost/xampp/...., else write for e.g: localhost/mw-config/index.php

Aadil
  • 189
  • 4
0

Enter the command in Terminal:

sudo gedit /opt/lampp/etc/httpd.conf

and comment the line as below.

Virtual hosts

Include etc/extra/httpd-vhosts.conf**

now Restart the Lampp with

sudo gedit /opt/lampp/lamp restart

go to your browser and refresh the page it works.

Jaimin
  • 21
0

Make sure you also start the MySQL service in Xampp control panel. This might resolve this.

unitom
  • 129
  • 6
  • 1
    Can you provide more detail? Is the 404 error described the expected error when MySQL is not running? – benc Jan 12 '19 at 18:05
0

First you have to check if FileZilla is running on xampp control panel Than such error can occur You have to stop the FileZilla service from Xampp control panel

Pars
  • 1
0

Solution for windows users: XAMPP

Go to: path:\xampp\apache\conf\extra

Open file named httpd-vhosts.conf

comment below lines if they are enabled: comment all lines in between <VirtualHost *:80> all lines between </VirtualHost

0

Check if you have the correct file mentioned in form statement in HTML:

For eg:

form action="insert.php" method="POST">
</form>

when you are in trial.php but instead you give another fileName

Ardent Coder
  • 3,777
  • 9
  • 27
  • 53
0

To resolve the error of object not found I searched many answers for this but of no use then i got my output to my program by slight change in the settings .I recommend you to follow this. 1.open settings 2.search file explorer options 3.Go to view in file explorer options 4.And unmark "hide extensions for known file types". it will solve the error.

0

Make sure the folder you have created inside htdocs are present there and you browse the right url.

for example

localhost/yoursitename

make sure yoursitename folder is present

MD SHAYON
  • 7,001
  • 45
  • 38
-1

I was getting this error

https://docs.google.com/file/d/0B-dUcqacTOLPcmI3SENMZFBLWG8/edit?usp=drivesdk

but I have done some coding into htdocs/index.php and made this like wamp homepage some thing like this

https://docs.google.com/file/d/0B-dUcqacTOLPVC1ORS1saGdOclU/edit?usp=drivesdk