Reputation: 13
I am trying to deploy a laravel project to a shared hosting platform but it keeps giving me this error 500 -Internal Server Error. It is currently working in my localhost. I have checked other site but with no avail even though .htaccess has been said to be the course but i am yet to figure it out. I have been trying for 5days but have not gotten it.
This is my .htacess file
<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]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
If any other file is needed, i would provide. I need to deliver to a client.
Upvotes: 1
Views: 2001
Reputation: 6792
If you cannot check the logs ( what would be the prefered way ) you can put this in your code
error_reporting(E_ALL);
ini_set("display_errors", 1);
Simply add it to the index.php of your public folder - if this is not working add it within the bootstrap of your app ( basically the very first thing called ) Then open the page and you will see the error.
Do not forget to remove these lines when the error is resolved
Usually the problem is missing access rights to the storage folder. If you use Filezilla for example simply rightclick the storage folder of your app and select File permission Ensure 777 is set and cascade it for every file and folder.
Upvotes: 1