Thanks to help I received in forums I have come up with the best server-side way to protect Glype and PHProxy from hotlinkers. The internal protection in both scripts might fall short. This is a more accurate update from my old method which involved restricting hotlink access to all PHP files. This version focuses on specific files only.
The following examples can be placed in your .htaccess file.
Glype hotlink protection:
Allow specific sites to hotlink Glype:Code:RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com/ [NC] RewriteRule ^browse\.php$ http://example.com/403.shtml [R,NC]
PHProxy hotlink protection:Code:RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com/ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?exampletwo.com/ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?examplethree.com/ [NC] RewriteRule ^browse\.php$ http://example.com/403.shtml [R,NC]
Allow specific sites to hotlink PHProxy:Code:RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com/ [NC] RewriteRule ^index\.php$ http://example.com/403.shtml [R,NC]
Code:RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com/ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?exampletwo.com/ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?examplethree.com/ [NC] RewriteRule ^index\.php$ http://example.com/403.shtml [R,NC]


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks