Skip to content

Instantly share code, notes, and snippets.

@AaEzha
Created April 16, 2022 07:35
Show Gist options
  • Select an option

  • Save AaEzha/86a76f22ed6bb252083bd7c4cf8305ff to your computer and use it in GitHub Desktop.

Select an option

Save AaEzha/86a76f22ed6bb252083bd7c4cf8305ff to your computer and use it in GitHub Desktop.
Laravel .htaccess Apache
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ ^$1 [N]
RewriteCond %{REQUEST_URI} (\.\w+$) [NC]
RewriteRule ^(.*)$ public/$1
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ server.php
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment