- Code: Select all
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?our-site\.com/.*$ [NC]
RewriteRule .*\.(gif|jpg|png|jp2)$ http://www.out-site.com/no_hot_linking.gif [F,NC]
This works great in Mozilla based browsers regardless of the way the URL is capitalized. However, Internet Explorer can't fetch the images if the caps are different in the base domain name.
For instance, if a visitor types in "www.our-site.com" in IE, all of the images show up. However, if they type "www.Our-Site.com", all of the images show as empty boxes with a red X. This problem doesn't manifest with Mozilla based browsers.
I even tried adding the line
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?Our-Site\.com/.*$ [NC]
before the RewriteRule but the problem remains.
What is wrong here?
I'm using Apache 1.3.31.
Thanks in advance!