RewriteEngine on
#RewriteCond %{HTTP_HOST} ^www.toplistlinks.com\.com$
#RewriteRule ^(.*) http://www.toplistlinks.com/$1 [R=301]

# If requested resource is an media file
rewritecond $1 \.(gifjpgcssxmlpngjsico)$ [OR]
# or if it exists as a directory
rewritecond %{REQUEST_FILENAME} -d [OR]
# or if it exists as a file
rewritecond %{REQUEST_FILENAME} -f
# then skip the next four rules
RewriteRule (.*) - [S=7]


RewriteRule ^category/(.*)/page/(.*)$ index.php?cat=$1&page=$2
RewriteRule ^category/(.*)/(.*)/page/(.*)$ index.php?cat=$1&cat1=$2&page=$3
RewriteRule ^filter/(.*)/page/(.*)$ index.php?filter=$1&page=$2
RewriteRule ^category/(.*)/filter/(.*)$ index.php?cat=$1&filter=$2
#RewriteRule ^category/(.*)/filter/(.*)/page/(.*)$ index.php?cat=$1&filter=$2&page=$3
RewriteRule ^filter/(.*)$ index.php?filter=$1
RewriteRule ^category/([a-z\-A-z]+)$ index.php?cat=$1
RewriteRule ^category/([a-z\-A-z]+)/([a-z\-A-z]+)$ index.php?cat=$1&cat=$2
RewriteRule ^category/([a-z\-A-z]+)/([a-z\-A-z]+)/([a-z\-A-z]+)$ index.php?cat=$1&cat=$2&cat=$3
RewriteRule ^remove/(.*)$ save.php?id=$1&ch=s
RewriteRule ^edit/(.*)$ Editlink.php?id=$1&ed=y
RewriteRule ^page/(.*)$ index.php?page=$1
RewriteRule ^pages/(.*)$ $1.php
RewriteRule ^siteinfo/(.*)$ vote.php?id=$1
RewriteRule ^in/(.*)$ hits.php?action=in&key=$1
RewriteRule ^out/(.*)$ hits.php?action=out&key=$1


<FilesMatch "(\.(sqlite|sql)|~)$">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>
ErrorDocument 403 http://www.toplistlinks.com
