# Turn on URL rewriting
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 ^(index.php|robots.txt|favicon.ico|media|js|css|img) - [PT,L]
# Protect application and system files from being viewed
RewriteRule ^(application|modules|system) - [F,L]
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT,L]