# Options:
# -MultiViews: Turns off multiviews so it doesn't interfer with our rewrite rules
# -Indexes: Stop directory listings
# +FollowSymlinks: Let out rewrite rules work
# AddDefaultCharset UTF-8
Options -MultiViews -Indexes +FollowSymlinks

<IfModule mod_security.c>
	# Turn off mod_security filtering.
	# SecFilterEngine Off

	# The below probably isn't needed, but better safe than sorry.
	SecFilterScanPOST Off
</IfModule>

ErrorDocument 404 /404.php

<IfModule mod_php5.c>
	php_value register_globals 0
	php_value magic_quotes_gpc 0
	php_value session.auto_start 0
	php_value safe_mode 0
</IfModule>

<IfModule sapi_apache2.c>
	php_value register_globals 0
	php_value magic_quotes_gpc 0
	php_value session.auto_start 0
	php_value safe_mode 0
</IfModule>

<IfModule mod_rewrite.c>

	RewriteEngine On
        RewriteBase /
RewriteRule ^modrewrite.test*$ index.php [L]

RewriteRule ^([^/]*)\.html$ index.php?slug=$1 [L]
RewriteRule ^(admin)/([^/]*).html$ $1/index.php?slug=$2 [L]
RewriteRule ^(profile)/([^/]*).html$ $1/index.php?slug=$2 [L]
RewriteRule ^([^/]*)/([^/]*).html$ index.php?slug=$1&query=$2 [L]

</IfModule>
<IfModule mod_deflate.c>
	AddOutputFilterByType DEFLATE application/x-javascript text/css text/html text/xml
</IfModule>

php_flag register_globals 0