Zen Cart Logo
Forums / General Questions / Hot Link Protection With SEO url's

Hot Link Protection With SEO url's

Locked

Views: 1,992

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
13 Apr 2007, 6:55 PM
#1
kenaniah avatar

kenaniah

Zen Follower

Join Date:
Jun 2005
Posts:
111
Plugin Contributions:
0

Hot Link Protection With SEO url's

I am using SEO url's and cannot just tell my cpanel to enable Hot Link Protection or SEO url's will die. I have found some interesting stuff on doing this myself but I am no .htaccess programmer.

Here is what I have found so far:

ADDED to .htaccess

Options +FollowSymLinks
RewriteEngine On
(Keep in mind that SEO url's are in this portion)

no hot-linking

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?mystore.com/ [nc]
RewriteRule .(gif|jpg|png|jpeg?)$ http://mystore.com/images/mystoreAd.jpg [nc]

The problem with the above is that

  1. The Free Advertising Image doesn't show up on the freeloaders pages.... only a missing picture box.
  2. The Free Advertising Image shows up on my https:// pages.

Any solutions?

Thank you!

Michael

17 Apr 2007, 4:33 PM
#2
kenaniah avatar

kenaniah

Zen Follower

Join Date:
Jun 2005
Posts:
111
Plugin Contributions:
0

Re: Hot Link Protection With SEO url's

For those interested in Hot Link protection for both http and https here is what I currently have in my .htaccess file:

no hot-linking

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^https?://(www.)?enteryoursitenamehere.com/ [nc]
RewriteRule .(gif|jpg|png|jpeg?)$ - [F]

Seems to be working fine right now. I couldn't (and don't have time right now to) figure out how to get the free advertising.