Skip to content

Instantly share code, notes, and snippets.

@morningtoast
Last active October 13, 2015 17:57
Show Gist options
  • Select an option

  • Save morningtoast/4234101 to your computer and use it in GitHub Desktop.

Select an option

Save morningtoast/4234101 to your computer and use it in GitHub Desktop.
htaccess for CodeIgniter
RewriteEngine on
# If the request is not for a valid directory
RewriteCond %{REQUEST_FILENAME} !-d
# If the request is not for a valid file
RewriteCond %{REQUEST_FILENAME} !-f
# If the request is not for a valid link
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [PT,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment