LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-03-2006, 06:56 AM   #1
<db>
LQ Newbie
 
Registered: Apr 2006
Location: US
Posts: 9

Rep: Reputation: 0
.htaccess preventing hotlinking


How can I prevent hotlinking only on some of the directories?

I'd like to let people hotlink all files, except all jpg images on /path/dir1/dir2/ and on any of it's subdirectories, such as /path/dir1/dir2/dir3/ and so on, should turn to http://www.domain.com/dir1/hotlink/dontsteal.jpg

There are many of those subdirs on different depths, so I can't just write every dir on their own line.

This is a some kind of start, but does not work at all:
Code:
RewriteRule /path/dir1/dir2/(.+)\.(jpg) http://www.domain.com/dir1/hotlink/dontsteal.jpg
Cheers, <db>
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Preventing Deadlocks bfavreman04 Mandriva 1 12-06-2005 04:01 PM
preventing user from going outside his folder omashhour Linux - Networking 1 12-18-2004 11:54 AM
Preventing Login rickseiden Linux - Security 3 12-01-2004 02:45 PM
Preventing Changes To Desktop xenic501 Linux - Security 1 05-03-2004 01:36 PM
preventing from attack vcheah Linux - Security 1 01-15-2002 02:43 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration