Jump to content

.htaccess It wont work


SharkBait

Recommended Posts

Ok trying to stop hotlinking and this is what I have in my .htaccess file


[code]

RewriteEngine On

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?hostedtest\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?myplace\.com/ [NC]
RewriteRule \.(jpe?g|gif|png|pdf)$ - [NC,F]

[/code]

Though it doesn't seem to be working.  I need to block all hotlinking attempts to images and pdfs.

The above myplace.com is fictional the real site is in there instead but doesn't seem to be working.

mod_rewrite is turned on because I do use it for other applications within the site. I can also do redirects via .htaccess too :)

What am I doing wrong?
Link to comment
Share on other sites

Thanks for moving it :)

Anyone see anything wrong with the .htaccess I use to blocking image hotlinking?

**Edit:

The issue I was having was the line with hostedtest.com in it.  What is the flag I need to set so that it continues down the list and reads the other rules? L??

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.