Skip to content

Instantly share code, notes, and snippets.

@marklundin
Created October 21, 2011 14:30
Show Gist options
  • Save marklundin/1303985 to your computer and use it in GitHub Desktop.
Save marklundin/1303985 to your computer and use it in GitHub Desktop.
Rewrite
Options -Indexes +FollowSymlinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !/cache/
RewriteRule (.*) cache/$1 [NC]
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ index.php?/$1 [L,NC]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment