Reputation: 1101
I have a Laravel 5.7 project working fine, but I changed the host and i got this error:
Laravel 403 Forbidden Error
I updated the .htaccess
file with this code:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
but I still get the error.
Upvotes: 1
Views: 795
Reputation: 46
I had the same problem, what I did to fix this was to change permissions on the root folder of the project from 0644 to 0755.
Upvotes: 1
Reputation: 10061
Inside your .htaccess
change to this:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Upvotes: 4
Reputation: 329
You should try
chown -R www-data:www-data .
within your website folder
Upvotes: 2