Skip to content

Instantly share code, notes, and snippets.

@jackmcdade
Created April 27, 2012 13:30
Show Gist options
  • Save jackmcdade/2509224 to your computer and use it in GitHub Desktop.
Save jackmcdade/2509224 to your computer and use it in GitHub Desktop.
EE Mod Rewrite
AcceptPathInfo On
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
# Looks for files and directories that do not exist
# and provide the segments to the index.php file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^/index.php
RewriteCond $1 !.(css|js|png|jpe?g|gif|ico)$ [NC]
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment