ErrorDocument 404 ./error.php
ErrorDocument 500 /500.php
Options +FollowSymlinks
Options -Indexes
<Files .htaccess>
deny from all
</Files>
<Files ~ "\.log$">
	Order allow,deny
	Deny from all
</Files>
<ifModule mod_php5.c>
	php_value zlib.output_compression 16386
	php_value register_globals off
	php_value session.use_trans_sid 0
</ifModule>
<ifModule mod_rewrite.c>
RewriteEngine on 
RewriteRule ^(/*)\.html $1\.php 

ErrorDocument 400 /error.php?e=400
ErrorDocument 401 /error.php?e=401
ErrorDocument 403 /error.php?e=403
ErrorDocument 404 /error.php?e=404
ErrorDocument 500 /error.php?e=500

RewriteRule ^captcha.jpg$ ./captcha/captcha.php

RewriteRule ^tag(|/)$ /tags.php
RewriteRule ^tag/([^/]+)(|/)$ /tags.php?search=$1
RewriteRule ^r=(.*)$ refer.php?r=$1
RewriteRule ^refer/(.*)$ refer.php?r=$1

RewriteRule ^articles/archive$ ./articles.php?archive=true [QSA]
RewriteRule ^articles/archive?pageNumber=(.*)$ ./articles.php?archive=true&pageNumber=$1
RewriteRule ^articles/category/(.*)$ ./articles.php?category=$1
RewriteRule ^articles/rss.xml$ ./xml/rss.php
RewriteRule ^articles/(.*)-(.*)/in/category/(.*)$ ./articles.php?id=$1&category=$3
RewriteRule ^articles/(.*)-(.*)/in/archive$ ./articles.php?id=$1&archive=true
RewriteRule ^articles?articles=(.*)-(.*)$ ./articles?articles=$1-(.*)

RewriteRule ^static/components/updateHabboCount$ /static/updateHabboCount.php

RewriteRule ^static/gamedata/figuredata$ /static/gamedata/figuredata.xml

RewriteRule ^static/gamedata/furnidata(/*)$ /static/gamedata/furnidata.txt
RewriteRule ^static/gamedata/productdata(/*)$ /static/gamedata/productdata.txt

RewriteRule ^static/gamedata/external$ /static/gamedata/external.php
RewriteRule ^static/gamedata/external_variables(/*)$ /static/gamedata/external_variables.php
RewriteRule ^static/gamedata/external_flash_texts(/*)$ /static/gamedata/external_flash_texts.php

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(([A-Za-z0-9\-_]+/)*[A-Za-z0-9\-_]+)?$ $1.php
</ifModule>
<IfModule mod_deflate.c>
  <FilesMatch "\.(css|js|x?html?|php)$">
    SetOutputFilter DEFLATE
  </FilesMatch>
</IfModule>

