Skip to content

Instantly share code, notes, and snippets.

@megaxorg
Forked from Guibzs/.htaccess
Created June 21, 2019 07:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save megaxorg/f296c8069f699682ad8fc3c938160172 to your computer and use it in GitHub Desktop.
Save megaxorg/f296c8069f699682ad8fc3c938160172 to your computer and use it in GitHub Desktop.
Symfony 4 ~ .htaccess
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 302 ^/$ /index.php/
</IfModule>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment