/    Sign up×
Community /Pin to ProfileBookmark

Dont know why hotlinking does not work

I´m trying to implemente hotlinking, but dont know why i can make it work
This is the code I´m using:

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?mydomain.com/.*$ [NC]
RewriteRule .(gif|jpg|swf|bmp)$ [url]http://www.mydomain.com/images/nohotlinking.jpg[/url] [R,L]

can anyone help me?

thanks!!

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@bathurst_guyApr 13.2007 — I'm just checking - you are changing it where it says "mydomain" to you actual domain name.
Copy linkTweet thisAlerts:
@jonitasauthorApr 15.2007 — ...but I dont know why I doesnt work.

It could be because I´have another instructions?
Copy linkTweet thisAlerts:
@LeeUApr 16.2007 — Try this (there are a couple changes). Also, make sure the rewrite engine is on (as in first line):
[CODE]
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?domain.com/ [nc]
RewriteRule .*.(gif|jpg|png)$ http://domain.com/img/hotlink.png [nc][/CODE]
×

Success!

Help @jonitas spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...