<IfModule mod_rewrite.c>
RewriteEngine on

RewriteRule ^index.php$ content.php?mod=home [L]
RewriteRule ^detailpost-([0-9]+)-(.*)\.html$ content.php?mod=detailpost&id=$1 [L]
RewriteRule ^pages-([0-9]+)-(.*)\.html$ content.php?mod=pages&idp=$1 [L]
RewriteRule ^gallery\.html$ content.php?mod=gallery [L]
RewriteRule ^contact\.html$ content.php?mod=contact [L]
RewriteRule ^category-([0-9]+)-(.*)\.html$ content.php?mod=category&idc=$1 [L]
RewriteRule ^page-(.*)-category-([0-9]+)-(.*)\.html$ content.php?mod=category&idc=$2&page=$1 [L]
RewriteRule ^search-result\.html$ content.php?mod=searchresult [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# hapus tanda pagar (#) untuk mode maintenance website
# RewriteCond %{REMOTE_ADDR} !^123\.456\.789\.000
# RewriteCond %{REQUEST_URI} !/popojicms/maintenance.html$ [NC]
# RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC]
# RewriteRule .* /popojicms/maintenance.html [R=302,L]

</IfModule>