<FilesMatch "\.(bak|inc|lib|sh|tpl|lbi|dwt)$">

    order deny,allow

    deny from all

</FilesMatch>



RewriteEngine On



#RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)



# main

RewriteRule ^index\.html$    index\.php [L]

RewriteRule ^sitemap\.xml$    sitemap\.php [L]



# news

RewriteRule ^news(/o)*([0-9]*)$       article_category\.php\?page=$2   [QSA,L]

RewriteRule ^news(/*)([a-z0-9-]*)(/*o*)([0-9]*)$       article_category\.php\?unique_id=$2&page=$4   [QSA,L]



RewriteRule ^news/([0-9]+)\.html$       article\.php\?id=$1&rewrite=1   [QSA,L]

RewriteRule ^news/([a-z0-9-]+)/([0-9]+)\.html$       article\.php\?id=$2&unique_id=$1   [QSA,L]



# product

RewriteRule ^product(/o)*([0-9]*)$       product_category\.php\?page=$2   [QSA,L]

RewriteRule ^product(/*)([a-z0-9-]*)(/*o*)([0-9]*)$       product_category\.php\?unique_id=$2&page=$4   [QSA,L]



RewriteRule ^product/([0-9]+)\.html$       product\.php\?id=$1&rewrite=1   [QSA,L]

RewriteRule ^product/([a-z0-9-]+)/([0-9]+)\.html$       product\.php\?id=$2&unique_id=$1   [QSA,L]



# onepage

RewriteRule ^([a-z0-9-]+)\.html$       page\.php\?unique_id=$1   [QSA,L]

RewriteRule ^guestbook(/)*([a-z]*)$       guestbook\.php\?rec=$2   [QSA,L]