Skip to content

Instantly share code, notes, and snippets.

@ifeanyiifeanyi
Forked from ganeshaampuh/.htaccess
Created December 9, 2024 14:07
Show Gist options
  • Select an option

  • Save ifeanyiifeanyi/13dd976fe3fe93145bd8bee8284979b4 to your computer and use it in GitHub Desktop.

Select an option

Save ifeanyiifeanyi/13dd976fe3fe93145bd8bee8284979b4 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>
@ifeanyiifeanyi
Copy link
Author

n

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