Web Hosting Talk







View Full Version : Wildcards in htaccess and other server woes...


raqman
05-11-2002, 10:18 PM
There a way to make htaccess stop hotlinking without preventing subdomains from using images?

Currently I'm using:

Options +FollowSymlinks
Rewriteengine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://mydomain.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://*.mydomain.net/.*$ [NC]
RewriteRule .*\.(gif|GIF|jpg|JPG)$ - [F]

Which does not work for subdomains.

raqman
05-12-2002, 01:41 PM
Anyone? Can't be that hard can it? :-)

raqman
05-15-2002, 11:06 AM
Sorry to bump but really need a way to solve this... :-(

provet
05-15-2002, 04:34 PM
read about "SetEnvIf Referer" at apache.org