# Set default error pages
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default
<IfModule mod_rewrite.c>
RewriteEngine on
# Remove www prefix
RewriteCond %{HTTP_HOST} ^www.*REMOVED*.net$ [NC]
RewriteRule ^(.*)$ https://*REMOVED*.net/$1 [R,L]
# Force SSL
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://*REMOVED*.net/$1 [R,L]
# xenForo rules
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
# Prevent direct usage of resources on other websites
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://*REMOVED*.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://*REMOVED*.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.*REMOVED*.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.*REMOVED*.net$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|woff|eot|svg|ttf|otf|mp3|ogg|wav|flac)$ - [F,NC]
</IfModule>
# Other stuff
Options -Indexes