View Single Post
Old 2005-06-23, 12:55 PM   #9
Anothers
If something goes wrong at the plant, blame the guy who can't speak English
 
Join Date: Jan 2004
Location: Poland
Posts: 30
Quote:
Originally Posted by Roni20
If i have :

RewriteEngine on
RewriteRule ^domain.com/dir/dir/dir/image.jpg$ - [L]

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domain.com.*$ [NC]
RewriteRule (jpg|jpeg|png|gif)$ - [F,L]
hmm

let's suppose this image is
http://www.domain.com/images/image.jpg

then this should work

RewriteEngine on

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domain.com.*$ [NC]
RewriteCond %{REQUEST_URI} !^/images/image.jpg$
RewriteRule (jpg|jpeg|png|gif)$ - [F,L]

Edited: RewriteEngine off - turns off all rewrite engine so anything like RewriteCond or RewriteRule doesnt work when is below RewriteEngine off
Anothers is offline   Reply With Quote