Skip to content

Instantly share code, notes, and snippets.

@akinozgen
Created July 20, 2017 10:15
Show Gist options
  • Save akinozgen/1396f518a10639b46300857e35c126bd to your computer and use it in GitHub Desktop.
Save akinozgen/1396f518a10639b46300857e35c126bd to your computer and use it in GitHub Desktop.
perfect htaccess for my frameworks
# Open rewriteEngine
RewriteEngine on
# Allow removing /resources, index,
# index.php, robots.txt and robots
# from url
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Allow remove index.php and use after them
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment