Skip to content

Instantly share code, notes, and snippets.

@iwebroot
Last active February 10, 2019 14:47
Show Gist options
  • Save iwebroot/cae09a494273c6eb961a8dc22c0f1233 to your computer and use it in GitHub Desktop.
Save iwebroot/cae09a494273c6eb961a8dc22c0f1233 to your computer and use it in GitHub Desktop.
[Fix error : 500] : Multiple laravel projects in shared hosting
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
### Add two lines for fix error 500 ###
Options -Indexes
php_flag xcache.cacher 0
#######################################
# 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>
@iwebroot
Copy link
Author

Hi all,
I have tested in different hosting.
php_flag is not authorized in .htaccess on some hosting. For fix, you can disable cache from php.ini or user.ini.
Sorry for the delay.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment