Skip to content

Instantly share code, notes, and snippets.

@SuoXC
Created January 1, 2019 12:45
Show Gist options
  • Save SuoXC/14c51bcb6450daed0c92e1029241f26a to your computer and use it in GitHub Desktop.
Save SuoXC/14c51bcb6450daed0c92e1029241f26a to your computer and use it in GitHub Desktop.
apache php single entrance config file, place it in root dir of project
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
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