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
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.
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>
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
Make sure you also start the MySQL service in Xampp control panel. This might resolve this.
Enter the command in Terminal:
sudo gedit /opt/lampp/etc/httpd.conf
and comment the line as below.
now Restart the Lampp with
sudo gedit /opt/lampp/lamp restart
go to your browser and refresh the page it works.
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