Skip to content

Instantly share code, notes, and snippets.

@martinshaw
Created May 20, 2017 16:48
Show Gist options
  • Save martinshaw/a0f3cfd3a9adb46cd8e25eec89abcf81 to your computer and use it in GitHub Desktop.
Save martinshaw/a0f3cfd3a9adb46cd8e25eec89abcf81 to your computer and use it in GitHub Desktop.
Suggested Laravel 5 htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /laravel51/public/
# change above to your site i.e., RewriteBase /whatever/public/
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment