In the file structure you have there, in public the index should be the index.php not html. In the index.php it with have the route to the main app
500 Error - Laravel Project Deployment on Shared Hosting
I have difficulty deploying my laravel project on 1and1 managed hosting. And specifically, adjusting the .htaccess so that there is no 500 error when trying to access https://www.muza-store.de
My project structure:
/muza-store
/public
.htaccess
index.php
php-errors.log
php.ini
...
/resources
/routes
/storage
.env
...
I just changed the project root to the /muza-store -directory. The public-directory as the root didn't work because the other directories and files above the root-directory couldn't be accessed.
This is the content of the .htaccess-file:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
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]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
Unfortunately, everything I tried didn't work at all.
I would greatly appreciate ideas, tipps and resources to learn more about .htaccess -files.
Thanks a lot!
Please or to participate in this conversation.