Skip to content

Instantly share code, notes, and snippets.

@ehzawad
Created March 5, 2016 22:24
Show Gist options
  • Select an option

  • Save ehzawad/18d3400a50686001b94c to your computer and use it in GitHub Desktop.

Select an option

Save ehzawad/18d3400a50686001b94c to your computer and use it in GitHub Desktop.
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteBase /
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>
@ehzawad

ehzawad commented Mar 5, 2016

Copy link
Copy Markdown
Author

.htacess for Laravel for Apache vhost

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