# Disable magic quotes
php_flag magic_quotes_gpc 0
php_flag magic_quotes_runtime 0
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php?q=$0
<FilesMatch ".(php)$">
Deny from all
</FilesMatch>
<FilesMatch "index.(php)$">
Allow from all
</FilesMatch>
<FilesMatch ".(cache)$">
Deny from all
</FilesMatch>
<FilesMatch ".(log)$">
Deny from all
</FilesMatch>
AddDefaultCharset UTF-8