Skip to content

Instantly share code, notes, and snippets.

@slouma2000
Last active August 29, 2015 14:07
Show Gist options
  • Save slouma2000/4f4f0acc90f2cf197dec to your computer and use it in GitHub Desktop.
Save slouma2000/4f4f0acc90f2cf197dec to your computer and use it in GitHub Desktop.
htaccess laravel
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
#Options -MultiViews
</IfModule>
SetEnv LARAVEL_ENV production
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
# 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