Home » Php » php – Requested URL not found – Laravel 6

php – Requested URL not found – Laravel 6

Posted by: admin February 25, 2020 Leave a comment


I am trying to upload a my project to the server.the first page is working properly and when i go for another page am getting error like The requested URL was not found on this server.
Apache/2.4.29 (Ubuntu) Server at Port 80
. i think the problem is at .htaccess file,here is my .htaccess file placed in the public directory

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

RewriteEngine On

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

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

# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

Here is my app_url placed in .env file


Here is the virtual host configuration

    DocumentRoot /var/www/studio/public
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /var/www/studio/public>
     Options +Indexes +Includes +FollowSymLinks +Multiviews
        AllowOverride All
        Require all granted

i tried a lot but always getting 404 error

How to&Answers: