Forum Moderators: phranque
The good news is I was able to rewrite most of the rule set with the exception of allowing the one particular directory. Can someone help me figure out how to do that. I just can't remember it for the life of me.
Below is the code I have the blocks all images on my server and loads a bogus red x image. I just need to allow images in a specific directory to be able to be linked.
code:
RewriteEngine on
RewriteRule ^/redx.gif$ - [PT,L]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?domain1.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?domain2.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?12.34.567.89(/)?.*$ [NC]
RewriteRule .*\.(gif夸pg夸peg在mp妃pg妃peg屹ip圯xe地vi妃ov存wf)$ [myshost.com...] [R,NC]
[edited by: Krugar at 4:24 am (utc) on June 15, 2004]
RewriteEngine on
RwriteCond %{REQUEST_URI} !^/redx\.gif$
RwriteCond %{REQUEST_URI} !^/allowed_directory/
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain1\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain2\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://192\.168\.0\.89 [NC]
RewriteRule \.(gif夸pe?g在mp妃pe?g屹ip圯xe地vi妃ov存wf)$ /redx.gif [NC]