[TIP] Save Bandwith w/ a .htaccess file [TIP] Save Bandwith w/ a .htaccess file
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

[TIP] Save Bandwith w/ a .htaccess file

Started by cordis, November 15, 2004, 08:22:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cordis

.htaccess file

SetEnvIfNoCase Referer "^http://www.mydomain.com/" locally_linked=1
SetEnvIfNoCase Referer "^http://www.mydomain.com$" locally_linked=1
SetEnvIf Referer "^$" locally_linked=1
<FilesMatch "\.([gG][iI][fF]|[pP][nN][gG]|[jJ][pP][gG]|[sS][wW][fF]|[aA][vV][iI]|[mM][pP]3|[wW][mM][fF]|[wW][aA][vV])$">
  Order Allow,Deny
  Allow from env=locally_linked
</FilesMatch>


case insensitive FilesMatch.

SaigonK

How would this work, what savings does it create?
My gallery seems awful slow as of late, not sure if the database is just big or what, it is only 1.7MB, so that cant be it...

Joachim Müller

the code posted is meant as hotlink protection, there are already some postings in the mods section that discuss this in more detail - it won't speed up your site though. If you have troubles with speed/performance, you should post a link to your site, so we can take a look and tell you what is probably consuming most resources on load.

Joachim