| send those evil hotlinkers to picture hell..... |
|
"It doesn't seem to work?" Here's what should happen: if the hotlinked url is within an img tag, it will display as the default "not found" icon(that little box with the red x in it). If that image tag anchors another hotlinked image, or, the link goes directly to one of your protected images, they should get sent to your special place when its clicked. Make sure your .htaccess file was uploaded to your server in ASCII mode, without any file type extension. Check the file permissions, they should be 644 for most situtations. Most FTP clients allow you to change the file permissions, or telnet to your server and use chmod Each statement in your .htaccess file should be on its own line! Statements that span multiple lines can cause unpredictable results. Using multiple .htaccess files in different directories? Your .htaccess files may be conflicting with each other. Apache will use the last .htaccess file it encounters. You can force Apache to inherit, or concatenate the previous .htaccess files it has encountered with the current one by adding RewriteOptions inherit to the .htaccess files in your sub-directories. You might be executing the rules in an .htaccess file that you forgot you had! IF your server shadows files starting with a dot, your .htaccess files will be hidden from your FTP client. Telnet to your server and try listing your files like this ls -a, which will include any shadowed files. You might find the Unix links on the left useful. "Still broken?" Your host's configuration could be unique, get a sample .htaccess file from them to start with. Maybe your host hasn't installed the mod_rewrite module. If they haven't, asked them to. If they won't, find another provider! "Testing 1,2,3..." Anytime you add or change an .htaccess file, its a good idea to test it and make sure it isn't blocking everyone. Create a test folder on your domain with a couple images on a simple page and use this folder to try out your .htaccess rules before installing them in your production folder(s). Hotlinking.com has a handy page for testing your rules, link is over on the left. |
Back to basics... Unix Basics File Commands .htaccess testing! www.hotlinking.com |