<Files ~ ".+\.(bak|conf|exe|sh|linux|run|bat|lnk|com|pif|xll|dll|cmd|old)$">
Order deny,allow
deny from all
</Files>
<Files ~ "(config.inc|maincore|config)+\.php$">
Order deny,allow
deny from all
</Files>

############### START REWRITE ENGINE ####################
RewriteEngine On

RewriteBase /
# or   
# RewriteBase /your_folder/
# Options +FollowSymLinks

## babycaleb.fortunecity.co.uk defense ##################
RewriteCond %{QUERY_STRING} http\: [OR]
RewriteCond %{QUERY_STRING} .txt?
RewriteRule ^(.*)$ - [F,L]


###### Article mod rewrite ######### German ###########
RewriteRule ^artikel.html$ articles.php [L]
RewriteRule ^artikel,([0-9]+),([a-zA-Z0-9_-]+).html$ articles.php?id=$1 [L]
RewriteRule ^artikel,kategorie,([0-9]+),([a-zA-Z0-9_-]+).html$ articles.php?cat_id=$1 [L]
RewriteRule ^artikel$ articles.php [L]

###### News mod rewrite ####################
RewriteRule ^news.html$ news.php [L]
RewriteRule ^news,([0-9]+),([a-zA-Z0-9_-]+).html$ news.php?readmore=$1 [L]
RewriteRule ^news,kategorie.html$ news_cats.php [L]
RewriteRule ^news,kategorie,([0-9]+),([a-zA-Z0-9_-]+).html$ news_cats.php?cat_id=$1 [L]
RewriteRule ^news,([0-9]+),([a-zA-Z0-9_-]+).html&rowstart=([0-9]+)$ news.php?readmore=$1&rowstart=$3 [L]

###### Weblinks mod rewrite ####################
RewriteRule ^weblinks.html$ weblinks.php [L]
RewriteRule ^weblinks,([0-9]+),([0-9]+),([a-zA-Z0-9_-]+).html$ weblinks.php?cat_id=$1&weblink_id=$2 [L]
RewriteRule ^weblinks,kategorie,([0-9]+),([a-zA-Z0-9_-]+).html$ weblinks.php?cat_id=$1 [L]
RewriteRule ^weblinks,kategorie,([0-9]+),([a-zA-Z0-9_-]+).html&rowstart=([0-9]+)$ weblinks.php?cat_id=$1&rowstart=$3 [L]
RewriteRule ^weblinks,click,([0-9]+),([0-9]+),([a-zA-Z0-9_-]+).html$ weblinks.php?cat_id=$1&weblink_id=$2 [L]


###### Downloads mod rewrite ####################
RewriteRule ^download.html$ downloads.php [L]
RewriteRule ^download,([0-9]+),([0-9]+),([a-zA-Z0-9_-]+).html$ downloads.php?id=$2 [L]
RewriteRule ^download,kategorie,([0-9]+),([a-zA-Z0-9_-]+).html$ downloads.php?cat_id=$1 [L]
RewriteRule ^download,kategorie,([0-9]+),([a-zA-Z0-9_-]+).html&rowstart=([0-9]+)$ downloads.php?cat_id=$1&rowstart=$3 [L]
RewriteRule ^download,file,([0-9]+),([0-9]+),([a-zA-Z0-9_-]+).html$ downloads.php?cat_id=$1&download_id=$2 [L]
RewriteRule ^download,screen,([0-9]+),([0-9]+),([a-zA-Z0-9_-]+).html$ downloads.php?cat_id=$1&img_id=$2 [L]


###### FAQ mod rewrite ####################
RewriteRule ^faq.html$ faq.php [L]
RewriteRule ^faq,([0-9]+),([0-9]+),([a-zA-Z0-9_-]+).html$ faq.php?cat_id=$1#dl$2 [L]
RewriteRule ^faq,kategorie,([0-9]+),([a-zA-Z0-9_-]+).html$ faq.php?cat_id=$1 [L]
RewriteRule ^faq,kategorie,([0-9]+),([a-zA-Z0-9_-]+).html&rowstart=([0-9]+)$ faq.php?cat_id=$1&rowstart=$3 [L]

###### Viewpage mod rewrite ####################
RewriteRule ^seite,([0-9]+),([a-zA-Z0-9_-]+).html$ viewpage.php?page_id=$1 [L]
RewriteRule ^seite,([0-9]+),([a-zA-Z0-9_-]+).html&page=([0-9]+)$ viewpage.php?page_id=$1&page=$3 [L]

###### Profile/Group mod rewrite ####################
RewriteRule ^profil,([0-9]+),([a-zA-Z0-9_-]+).html$ profile.php?lookup=$1 [L]
RewriteRule ^gruppe,([0-9]+),([a-zA-Z0-9_-]+).html$ profile.php?group_id=$1 [L]

###### Forum mod rewrite ######################
## default ##
RewriteRule ^forum.html$ forum/index.php [L]
RewriteRule ^forum/kategorie,([0-9]+),([a-zA-Z0-9_-]+).html$ forum/index.php?cat=$1 [L]
RewriteRule ^forum,([0-9]+),([a-zA-Z0-9_-]+).html$ forum/viewforum.php?forum_id=$1 [L]
RewriteRule ^forum/thema,([0-9]+),([a-zA-Z0-9_-]+).html$ forum/viewthread.php?thread_id=$1 [L]
RewriteRule ^forum/post,([0-9]+),([0-9]+),([a-zA-Z0-9_-]+).html$ forum/viewthread.php?thread_id=$1&pid=$2 [L]
RewriteRule ^forum/beitrag,([0-9]+),([0-9]+),([a-zA-Z0-9_-]+).html$ forum/viewthread.php?thread_id=$1&pid=$2 [L]


## with rowstart ##
RewriteRule ^forum,([0-9]+),([a-zA-Z0-9_-]+).html&rowstart=([0-9]+)$ forum/viewforum.php?forum_id=$1&rowstart=$3 [L]
RewriteRule ^forum/thema,([0-9]+),([a-zA-Z0-9_-]+).html&rowstart=([0-9]+)$ forum/viewthread.php?thread_id=$1&rowstart=$3 [L]

## with highlight ##
RewriteRule ^forum/thema,([0-9]+),([a-zA-Z0-9_-]+).html&highlight=([a-zA-Z0-9_-]+)&rowstart=([0-9]+)$ forum/viewthread.php?thread_id=$1&highlight=$3&rowstart=$4 [L]