...

View Full Version : http:// to http://www.



StephenNewton
07-01-2004, 06:03 PM
I'm using the .htaccess file below to stop hotlinking to images on my site. It works fine for http://www.stephennewton.com, but http://stephennewton.com is treated as a hotlinker.

I'm told I can set it for both http://stephennewton.com and http://www.stephennewton.com, but don't know how.

The code I'm using is...
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.stephennewton.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ http://us.f2.yahoofs.com/users/402b51c2_1740/bc/880e/__sr_/fa90.jpg?phRi.4ABcv2FZBc3 [R,L]

Nightfire
07-01-2004, 10:59 PM
Just a guess


RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.stephennewton.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://stephennewton.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ http://us.f2.yahoofs.com/users/402b...hRi.4ABcv2FZBc3 [R,L]

Span
07-01-2004, 11:31 PM
and: RewriteEngine On - note the uppercase: On

also, your RewriteRule only rewrites literally .gif or .jpg. Which makes no sense. It should somehow match a filename in front of the extension.
So, better change that into: RewriteRule .*\.(gif|jpg)$ http:// etc..

StephenNewton
07-02-2004, 08:03 AM
...that worked



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum