Skip to content

Instantly share code, notes, and snippets.

@mocheng
Created February 13, 2012 08:02
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 mocheng/1814851 to your computer and use it in GitHub Desktop.
Save mocheng/1814851 to your computer and use it in GitHub Desktop.
.htaccess for CodeIgniter
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|img|style|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment