Skip to content

Instantly share code, notes, and snippets.

@Danroyal001
Forked from ganeshaampuh/.htaccess
Created March 27, 2023 16:20
Show Gist options
  • Save Danroyal001/bd87b1a40ce399c7d5846071c035e16f to your computer and use it in GitHub Desktop.
Save Danroyal001/bd87b1a40ce399c7d5846071c035e16f to your computer and use it in GitHub Desktop.
Laravel default .htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
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]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment