RewriteEngine on
RewriteRule ^index\.html$ index.php
RewriteRule ^lien-he\.html$ index.php?act=contact
RewriteRule ^tim-kiem\.html$ index.php?act=search
RewriteRule ^tim-kiem-([a-zA-Z0-9_-]+)\.html$ index.php?act=search&type=$1
RewriteRule ^([a-zA-Z0-9_-]+)-posts-([0-9]+)\.html$ index.php?act=posts&id=$2
RewriteRule ^([a-zA-Z0-9_-]+)-posts-all\.html$ index.php?act=allposts
RewriteRule ^([a-zA-Z0-9_-]+)-posts-all-([0-9]+)\.html$ index.php?act=allposts&id=$2
RewriteRule ^([a-zA-Z0-9_-]+)-posts-all-([0-9]+)-page-([0-9]+)\.html$ index.php?act=allposts&id=$2&page=$3
RewriteRule ^([a-zA-Z0-9_-]+)-categories-([0-9]+)\.html$ index.php?act=categories&id=$2
RewriteRule ^([a-zA-Z0-9_-]+)-categories-([0-9]+)-page-([0-9]+)\.html$ index.php?act=categories&id=$2&page=$3

RewriteRule ^([a-zA-Z0-9_-]+)-item-([0-9]+)\.html$ index.php?act=item&id=$2
RewriteRule ^([a-zA-Z0-9_-]+)-item-all\.html$ index.php?act=allitem
RewriteRule ^([a-zA-Z0-9_-]+)-item-all-([0-9]+)\.html$ index.php?act=allitem&id=$2
RewriteRule ^([a-zA-Z0-9_-]+)-item-all-([0-9]+)-page-([0-9]+)\.html$ index.php?act=allitem&id=$2&page=$3
RewriteRule ^([a-zA-Z0-9_-]+)-kinditem-([0-9]+)\.html$ index.php?act=kinditem&id=$2
RewriteRule ^([a-zA-Z0-9_-]+)-kinditem-([0-9]+)-page-([0-9]+)\.html$ index.php?act=kinditem&id=$2&page=$3

# prevent viewing of a specific file
<files config.php>
order allow,deny
deny from all
</files>

<files account_add.php>
order allow,deny
deny from all
</files>

<files account_management.php>
order allow,deny
deny from all
</files>

<files account_recyclebin.php>
order allow,deny
deny from all
</files>

<files booking_management.php>
order allow,deny
deny from all
</files>

<files booking_recyclebin.php>
order allow,deny
deny from all
</files>

<files categories_add.php>
order allow,deny
deny from all
</files>

<files categories_management.php>
order allow,deny
deny from all
</files>

<files categories_recyclebin.php>
order allow,deny
deny from all
</files>

<files contact_management.php>
order allow,deny
deny from all
</files>

<files contact_recyclebin.php>
order allow,deny
deny from all
</files>