################## FILE SAFEGUARD
<FilesMatch "\.(cgi|py|pl|txt|log|sql|bs|asp|ror|swf)">
Deny from all
</FilesMatch>

###################################
## Windows hosting use
## <IfModule mod_rewrite.so>
###################################
######## MOD REWRITES #############

<IfModule mod_rewrite.so>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /

################## BANDWIDTH THEFT
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?localhost/mG4/.*$ [NC]
RewriteRule \.(gif|css|png|jpg|jpeg)$ http://localhost/mG4/images/bandwidth.bmp [R=302,L]

################## SUBDOMAIN REWRITING
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9_-]*)$ http://localhost/mG4/member.php?user=$1 [L,QSA]
</IfModule>

################## ERROR HANDLING
ErrorDocument 400 http://localhost/mG4/error.php?id=400
ErrorDocument 403 http://localhost/mG4/error.php?id=403
ErrorDocument 404 http://localhost/mG4/error.php?id=404
ErrorDocument 500 http://localhost/mG4/error.php?id=500

################## PHP SETTINGS
php_flag register_globals 0
php_flag display_errors 0
php_value upload_max_filesize 12M
php_value zlib.output_compression 16386