quote:What's mod_rewrite and more important: How do I check that?
Check to see if your host has mod_rewrite.
quote:It's a module for Apache (the webserver, not the chopper) that uses a rule-based rewriting engine to manipulate URLs on the fly.
Originally posted by Spike:
What's mod_rewrite and more important: How do I check that?
quote:I suddenly get the feeling that I've seen all of this before. Did we have a thread dedicated to this a while back?
dungeon sex is exhausting but also very fulfilling!!
quote:You use .htaccess, right? Then put all your images in one folder and protect it with .htaccess. Leave your banner in a non-protected folder. Done.
For instance, I want to allow hotlinking to my website's banner, which is advertisement and thus would be bad if it's blocked.
code:As you can see, I tossed in the %{REQUEST_URI} variable which was described in the Apache documentation -- I *thought* it would do what I was asking it to, but it's apparently not.RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://st-minutiae.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.st-minutiae.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://startrekrenaissance.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.startrekrenaissance.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://scn.infopop.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://flare.solareclipse.net/.*$ [NC]
RewriteCond %{REQUEST_URI} !^http://www.st-minutiae.com/graphics/access_denied.gif$ [NC]
RewriteCond %{REQUEST_URI} !^http://www.st-minutiae.com/graphics/banner2.gif$ [NC]
RewriteCond %{REQUEST_URI} !^http://www.st-minutiae.com/temp/.*$ [NC]
RewriteRule .*\.(gif|jpg)$ http://www.st-minutiae.com/graphics/access_denied.gif [R,L]
code:This whole thing (with the appropriate modifications for your own site) should be pasted into a text file that you name ".htaccess" with the leading period.RewriteEngine on
# The following lones will allow specific websites to pass
# through -- especially your own. Be sure to differentiate if
# you've got a non-WWW access. Also, the [NC] tag is
# essential to make it a "no case" -- that is, a case to be ignored.
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://st-minutiae.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.st-minutiae.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://startrekrenaissance.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.startrekrenaissance.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://scn.infopop.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://flare.solareclipse.net/.*$ [NC]
# The next lines allow you to exempt specific URI's that you
# WANT to share with others -- for example, a banner graphic.
RewriteCond %{REQUEST_URI} !^/graphics/access_denied.gif$ [NC]
RewriteCond %{REQUEST_URI} !^/graphics/banner2.gif$ [NC]
RewriteCond %{REQUEST_URI} !^/temp/.*$ [NC]
# And finally, the actual rule to apply when the above
# conditions are *not* met. Specifically, substitute the image
# with one complaining about stolen bandwidth.
RewriteRule .*\.(gif|jpg)$ http://www.st-minutiae.com/graphics/access_denied.gif [R,L]