Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

yet another HTACCESS question: hotlinking

 
   Web Hosting Problem Solving Community! (Home) -> Webmaster RSS
Next:  deny ip and show HTML page (.HTACCESS)  
Author Message
ihate

External


Since: Feb 03, 2004
Posts: 3



(Msg. 1) Posted: Tue Feb 03, 2004 8:32 pm
Post subject: yet another HTACCESS question: hotlinking
Archived from groups: alt>www>webmaster (more info?)

hy,

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.nl/.*$ [NC]
RewriteRule .*\.(jpg|gif|JPG|GIF)$ http://www.mydomain.nl/hotlink.gif [R,L]

This prevents hotlinking (at least, for most browsers). But it works half.

The rules prevents an image from being viewed when it's linked from a
website other than mydomain. but it does NOT show hotlink.gif to replace!

I searched many groups en websites but could not find any answer. My server
supports mod_rewrite (at least, PHPinfo says it is loaded).

Some advice??

wouter

ps. The image hotlink.gif DOES exists Wink

 >> Stay informed about: yet another HTACCESS question: hotlinking 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
htaccess question - Hi, How do I get to write the following as one line? RewriteCond %{HTTP_REFERER} !^http://images.google.co.uk/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://images.google.co.uk$ [NC] RewriteCond %{HTTP_REFERER} !^http://images.google.com.au/.*...

.htaccess question - I host a number of domains at a "well known hosting company" on various shared hosting plans. Most of these domains are simple static pages. Some have some dynamic content, some forms, some PHP to process the forms. What I want to do is to ...

htaccess rewrite code question - This code should, supposedly, convert everything that follows after / in the URL as GET data to the script. --------------------------------- Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^(.+)$ /?$1..

clashing htaccess files question - I have been using a htaccess file to enable people to access a folder to see a listing of files for download. The htaccess file is inside this folder and just contains the line Options Indexes. I have now also started using a htaccess file in the main...

What's up with livejournal ( ... hotlinking)? - Earlier today one livejournal site hotlinked to one of my site's images and suddenly sites all over the place are requesting the same image. Some are at livejournal.com and others are simply using a local file called lj.php at their domain. Within..
   Web Hosting Problem Solving Community! (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]