# Last update: 2010-05-04 15:59 HKT
<IfModule mod_php5.c>
php_flag register_globals off
</IfModule>
<IfModule mod_php4.c>
php_flag register_globals off
</IfModule>
<Files *.js>
Order allow,deny
allow from all
</Files>
<Files ~ "^.ht">
Order deny,allow
deny from all
</Files>
<Files *.log>
Order deny,allow
deny from all
</Files>
<Files error_log*>
Order deny,allow
deny from all
</Files>
<Files *.ini>
Order deny,allow
deny from all
</Files>
<Files *.inc>
Order deny,allow
deny from all
</Files>
<Files *.inc.php>
Order deny,allow
deny from all
</Files>
<Files *.class.php>
Order deny,allow
deny from all
</Files>
<Files *.module.php>
Order deny,allow
deny from all
</Files>
<Files *.cache.php>
Order deny,allow
deny from all
</Files>
<Files *.bak>
Order deny,allow
deny from all
</Files>
<Files *.del>
Order deny,allow
deny from all
</Files>
Options -Indexes
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^admin/?$ /cms/index.php?op=backend/login&ss=index.php?op=content_backend/home [R,L]
# Append all variables in original URL onto the target URL by [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^img/image_([0-9]+).jpg$ img/image.jpg?id=$1 [QSA,L]
RewriteRule ^login/?$ index.php?op=login [QSA,L]
RewriteRule ^logout/?$ index.php?op=logout [QSA,L]
RewriteRule ^account/?$ index.php?op=frontend/user_info_form [QSA,L]
RewriteRule ^latest.rss$ index.php?op=rss/get_rss&t=latest [QSA,L]
RewriteRule ^(comment|category|author)_([0-9]+).rss$ index.php?op=rss/get_rss&t=$1&id=$2 [QSA,L]
RewriteRule ^(.*).xsl$ index.php?op=rss/get_xsl&t=$1 [QSA,L]
RewriteRule ^([0-9]+)/?$ index.php?op=frontend/home&pg=$1 [QSA,L]
RewriteRule ^category/([^/.]+)/([^/.]+)/?$ index.php?op=frontend/category&sid=$1&pg=$2 [QSA,L]
RewriteRule ^content/([^/.]+)/?$ index.php?op=frontend/content&id=$1 [QSA,L]
RewriteRule ^author/([^/.]+)/([^/.]+)/?$ index.php?op=frontend/author&id=$1&pg=$2 [QSA,L]
RewriteRule ^tag/([^/.]+)/([^/.]+)/?$ index.php?op=frontend/tag_search&tid=$1&pg=$2 [QSA,L]
## You should customize the path to your index.php
ErrorDocument 401 /cms/index.php?op=error&e=HttpException&c=401
ErrorDocument 403 /cms/index.php?op=error&e=HttpException&c=403
ErrorDocument 404 /cms/index.php?op=error&e=HttpException&c=404
ErrorDocument 500 /cms/index.php?op=error&e=HttpException&c=503
ErrorDocument 503 /cms/index.php?op=error&e=HttpException&c=503