Find file
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (35 sloc) 1.27 KB
# Turn on URL rewriting
Options +FollowSymLinks
RewriteEngine On
# Installation directory
# RewriteBase /
# Allow these directories and files to be displayed directly:
# - index.php (DO NOT FORGET THIS!)
# - robots.txt
# - favicon.ico
# - Any file inside of the media/ directory
RewriteRule ^(crossdomain.xml|index.php|robots.txt|favicon.ico|media) - [PT,L]
RewriteRule ^(.*)staging/application/media/(.*) - [PT,L]
RewriteRule ^staging/(.*css)$ $1 [PT,L]
RewriteRule ^staging/(.*js)$ $1 [PT,L]
RewriteRule ^staging/(.*jpg)$ $1 [PT,L]
RewriteRule ^staging/(.*gif)$ $1 [PT,L]
RewriteRule ^staging/(.*png)$ $1 [PT,L]
RewriteRule ^staging/(.*swf)$ $1 [PT,L]
RewriteRule ^staging/(.*flv)$ $1 [PT,L]
RewriteRule ^staging/(.*f4v)$ $1 [PT,L]
RewriteRule ^staging/(.*)pdf$ - [PT,L]
# Allow css and js to be displayed directly
RewriteRule ^(.*)css$ - [PT,L]
RewriteRule ^(.*)js$ - [PT,L]
RewriteRule ^(.*)jpg$ - [PT,L]
RewriteRule ^(.*)gif$ - [PT,L]
RewriteRule ^(.*)png$ - [PT,L]
RewriteRule ^(.*)swf$ - [PT,L]
RewriteRule ^(.*)flv$ - [PT,L]
RewriteRule ^(.*)f4v$ - [PT,L]
RewriteRule ^(.*)pdf$ - [PT,L]
# Protect application and system files from being viewed
RewriteRule ^application|modules|system|upload(.*)$ - [F,L]
# Rewrite all other URLs to index.php/URL
RewriteRule ^(.*)$ index.php/$1 [PT,L]