Forum Moderators: phranque

Message Too Old, No Replies

Ban few sites, But allow others - Hotlinking

Pls help :)

         

suthra

5:38 am on Apr 5, 2006 (gmt 0)

10+ Year Member



I got codes to allow only certain sites to hotlink images, but ban others from hotlinking. But iam looking for a code, to

ban certain sites, but allow all others from hotlinking our image url.

Is there any type of code for this sort which can be done through .htaccess :)

Thanks in advance

s.s

jdMorgan

1:39 pm on Apr 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, certainly. But it' a relatively simple matter to modify the 'ban most' form of code to the 'allow most' form.

What specifically is it that you don't understand about coding this?

For more information, see the documents cited in our forum charter [webmasterworld.com].

Jim

suthra

4:34 am on Apr 6, 2006 (gmt 0)

10+ Year Member



Hi Jim thanks for your reply., The main thing was we wanted to ban only adult sites and allow all the remaining sites., :)

we also want to block all adult sites which use our XML urls to display content. Is this too possible through .htaccess :)

Thankx
sarathy.s

jdMorgan

3:13 pm on Apr 6, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You will have to define "adult sites" for mod_rewrite. That is, provide a list of specific sites or a list of words that appear only in those sites' names. Mod_rewrite can be used to block *anything* that you can unambiguously define in terms of client IP address, client hostname, HTTP referrer string, or any other HTTP request header or server variable available to Apache (see the list under RewriteCond in the mod_rewrite documentation).

For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim