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
https://forums.phpfreaks.com/topic/27515-htaccess-it-wont-work/
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
https://forums.phpfreaks.com/topic/27515-htaccess-it-wont-work/#findComment-128101
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.