Skip to content

Instantly share code, notes, and snippets.

@mtrl
Created November 17, 2011 11:16
Show Gist options
  • Select an option

  • Save mtrl/1372937 to your computer and use it in GitHub Desktop.

Select an option

Save mtrl/1372937 to your computer and use it in GitHub Desktop.
CodeIgniter .htaccess
# Customized error messages.
ErrorDocument 404 /index.php
# Set the default handler.
DirectoryIndex index.php
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment