Hot Linking HTACCESS File


#1

I’m having a hard time getting this to work for one of our domains.

See below:

RewriteEngine On
RewriteRule ^rss.xml$ http://feeds.feedburner.com/LiquorSnob [R]
RewriteRule ^atom.xml$ http://feeds.feedburner.com/LiquorSnob [R]
RewriteRule ^index.rdf$ http://feeds.feedburner.com/LiquorSnob [R]
RewriteRule ^index.xml$ http://feeds.feedburner.com/LiquorSnob [R]
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?liquorsnob.com/.*$ [NC]
RewriteRule .(gif|jpg)$ http://www.liquorsnob.com/hotlink.gif [R,L]

Should I move the referrer stuff to the top?


#2

You shouldn’t have “RewriteEngine On” twice. You could try to move the RewriteCond and the matching RewriteRule to the top. I don’t know if it makes a difference.

Try:

[code]RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?liquorsnob.com/.*$ [NC]
RewriteRule .(gif|jpg)$ http://www.liquorsnob.com/hotlink.gif [R]

RewriteRule ^rss.xml$ http://feeds.feedburner.com/LiquorSnob [R]
RewriteRule ^atom.xml$ http://feeds.feedburner.com/LiquorSnob [R]
RewriteRule ^index.rdf$ http://feeds.feedburner.com/LiquorSnob [R]
RewriteRule ^index.xml$ http://feeds.feedburner.com/LiquorSnob [R]
[/code]
Happy New Year!


[color=#000000]DreamHost Promo Code[/color]: [color=#CC0000]Save $50[/color] with the promo code DREAMTEAM