MyBB Central
Great Tutorial on .htaccess - Printable Version

+- MyBB Central (
+-- Forum: Mybb Central General Discussions (
+--- Forum: Introductions (
+---- Forum: Testing Area (
+---- Thread: Great Tutorial on .htaccess (/thread-3166.html)

Great Tutorial on .htaccess - Starnova - Jul 23, 2009

This works very well for us.. so I thought I would share it..It's easy and effective.

<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy All

RewriteEngine On
RewriteRule .* - [F]
ServerSignature Off
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 120 minutes"
ExpiresByType image/jpeg "access plus 120 minutes"
ExpiresByType image/png "access plus 120 minutes"
ExpiresByType text/css "access plus 60 minutes"
ExpiresByType text/javascript "access plus 60 minutes"
ExpiresByType application/x-javascript "access plus 60 minutes"
ExpiresByType text/xml "access plus 1 seconds"

What this does...
It does a few things:

1. the beginning denies all malicious access to .htaccess and htpasswd files
2. the second part denies all HEAD requests to domain ( lame kind of DDOS)
3. the 3d part doesn't allow pinging of your domain for server info, what type, cpu, mods installed etc.
4. the last part is about caching your forum. And it will become faster, especially if you use a lot of images etc.
All html is on 1 second and thus new topics you will see instant, the CSS file is cached for 60 minutes as well as javascripts of mods and mybb board.
All images are cached for 120 minutes.
This reduces the reload of images css etc etc by members browsers which results in lesser bandwidth and faster loading.

I have tested this on my forum with success hope you enjoy friends.

RE: Great Tutorial on .htaccess - Overdoser - Sep 30, 2009

wow great ^^ in sure omni would like to consider this...

RE: Great Tutorial on .htaccess - Rafael - Sep 30, 2009

Testing it.


Looks good Smile

RE: Great Tutorial on .htaccess - 88power88 - Oct 05, 2009

thank you Smile

RE: Great Tutorial on .htaccess - FBI - Oct 10, 2009

cool, done! Smile