Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2003-10-05, 05:24 AM   #1
Tino
Are you sure you're an accredited and honored pornographer?
 
Join Date: Sep 2003
Posts: 61
Send a message via ICQ to Tino
.htaccess

I have a .htaccess file set up to prevent hotlinking from certain domains. At first I set it up to disallow from only 1 domain(mysmutsearch) and it worked fine:

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://(www\.)?mysmutsearch.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://neighbourhoodgirls.com/ggg.jpg [R,NC]

But when I add more domains to the list, it dont work anymore. Not even the domain that I blocked in first code.

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://(www\.)?mysmutsearch.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?fusker.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?chatropolis.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://neighbourhoodgirls.com/ggg.jpg [R,NC]

Anyone know what im doing wrong?
__________________
Neighbourhoodgirls

Tino is offline   Reply With Quote
Old 2003-10-05, 07:48 AM   #2
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
Maybe your editor is adding something in there.

I don't use wildcards when I write mine. Here is what one of mine looks like.
http://cleogoodstuff.com/htaccess.txt
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2003-10-05, 09:22 PM   #3
Tino
Are you sure you're an accredited and honored pornographer?
 
Join Date: Sep 2003
Posts: 61
Send a message via ICQ to Tino
Thanks Cleo. I need the opposite effect though, my script should not tell which domains can hotlink. It should tell which domains that cannot hotlink.
__________________
Neighbourhoodgirls

Tino is offline   Reply With Quote
Old 2003-10-05, 09:39 PM   #4
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
I never seen htaccess used that way so I'm afraid I have no idea then.

Wouldn't it be a lot easier just to say which are good domains to hotlink?
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2003-10-05, 09:50 PM   #5
Tino
Are you sure you're an accredited and honored pornographer?
 
Join Date: Sep 2003
Posts: 61
Send a message via ICQ to Tino
Well - the traffic I have right now makes that impossible. I got perhaps 500 domains that I need to allow hotlinking from me, I only got 3 that cant, so....

Its kind of odd that my first file worked fine, but as soon as I add more than 1 domain to the list- it dont work anymore.
__________________
Neighbourhoodgirls

Tino is offline   Reply With Quote
Old 2003-10-05, 10:51 PM   #6
Tino
Are you sure you're an accredited and honored pornographer?
 
Join Date: Sep 2003
Posts: 61
Send a message via ICQ to Tino
I figured it out. This did the trick:

Options +FollowSymlinks
RewriteEngine on


RewriteCond %{HTTP_REFERER} ^http://(www\.)?fusker.com(/)?.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?mysmutsearch.com(/)?.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?chatropolis.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://neighbourhoodgirls.com/ggg.jpg [R,NC]


But thanks anyway Cleo:-)
__________________
Neighbourhoodgirls

Tino is offline   Reply With Quote
Old 2003-10-05, 10:58 PM   #7
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
That makes sense, but now I'm wondering why my htaccess does not need [OR] after each line.

Sometimes I think that htaccess is part black magic. lol
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2003-10-05, 11:03 PM   #8
Tino
Are you sure you're an accredited and honored pornographer?
 
Join Date: Sep 2003
Posts: 61
Send a message via ICQ to Tino
Small corrections- just in case anyone should need a thing like this. It has to be:

Options +FollowSymlinks
RewriteEngine on


RewriteCond %{HTTP_REFERER} ^http://(www\.)?fusker.com(/)?.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?mysmutsearch.com(/)?.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?chatropolis.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://neighbourhoodgirls.com/ggg.jpg [R,NC]


Not really sure how importent that [NC] flag is, but...

Ya, it really is odd Cleo. Thats why I couldnt figure out why my first one didnt work, cause the opposite worked fine.
__________________
Neighbourhoodgirls

Tino is offline   Reply With Quote
Old 2003-10-06, 09:58 AM   #9
urb
All the way from Room 101
 
urb's Avatar
 
Join Date: Aug 2003
Posts: 3,557
Send a message via ICQ to urb
I am wondering about HTTP_REFERER being blocked by products such as Norton Internet Security.

If you buy and install a straight version of NIS, you will find that sites protected by .htaccess will not show any images at all. All you will see is placeholders.

Your average punter will not have even heard of ZoneAlarm and will just visit a store to buy Norton or other brands which seem to be adding Ad-block and Privacy stuff.

I am also wondering how much market share Norton has (and products of similar Privacy control).

But what is really scary is the thought of cookies being blocked, especially CCBill cookies.
urb is offline   Reply With Quote
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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:49 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc