Results 1 to 1 of 1

Thread: Better Way to Protect Glype and PHProxy from Hotlinkers Using .htaccess

  1. #1
    vectro's Avatar
    vectro is offline I Like Stuff
    Join Date
    Dec 2008
    Location
    U.S.A.
    Posts
    630
    Thanks
    192
    Thanked 104 Times in 82 Posts

    Better Way to Protect Glype and PHProxy from Hotlinkers Using .htaccess

    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:

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com/ [NC]
    RewriteRule ^browse\.php$ http://example.com/403.shtml [R,NC]
    Allow specific sites to hotlink Glype:

    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]
    PHProxy hotlink protection:

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com/ [NC]
    RewriteRule ^index\.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]
    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]

  2. Thanked by:

    WebEvader (13 February, 2012)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •