# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /
# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
</Files>
# Protect application and system files from being viewed
RewriteRule ^(?:application|modules|system)b - [F,L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]
# Turn on Expires and mark all static content to expire in a week
ExpiresActive On
ExpiresDefault A0
<FilesMatch ".(jpg|jpeg|png|gif|js|css|ico)$">
ExpiresDefault A2592000
FileETag None
</FilesMatch>
# Rewrite old quoteden URLs
RewriteRule ^index.php/taxonomy/term/([0-9]+)/?$ /category/id/$1 [R=301,L]
RewriteRule ^index.php/node/([0-9]+)/?$ /quote/id/$1 [R=301,L]
RewriteRule ^index.php/top/?$ /quote/top [R=301,L]
RewriteRule ^index.php/search/node/(.*) /search?q=$1 [R=301,L]
RewriteRule ^index.php/frontpage/?$ / [R=301,L]
RewriteRule ^index.php/quotes/author /author [R=301,L]