Greenguy's Board


Go Back   Greenguy's Board > General Business Knowledge
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2006-06-16, 01:55 PM   #1
RedCherry
Of all the things I've lost, I miss my mind the most.
 
RedCherry's Avatar
 
Join Date: Apr 2004
Location: Middle of the Desert, Pahrump, NV
Posts: 3,187
Send a message via ICQ to RedCherry
Allowing a domain to hotlink you

Ok, just used the .htaccess in the FAQ section, and stopped some hotlinkers. But I have one domain that I use for picposts, so I want to allow some domains to hotlink me. How do I modify that .htacess to allow that?

this is what I have

ErrorDocument 404 http://www.mydomain.com/404.shtml
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(.*@)?([a-z0-9-]+\.)*mydomain\.com(:[0-9]+)?(/.*)?$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.*@)?1\.2\.3\.4(:[0-9]+)?(/.*)?$
RewriteRule .*\.(asf|mpg|mpeg|wmv|avi|rm|gif|jpeg|jpg|zip)$ - [NC,F,L]


how do I add in domains to that that are ok to hotlink?
RedCherry is offline   Reply With Quote
Old 2006-06-16, 02:27 PM   #2
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
RewriteCond %{HTTP_REFERER} !^http://(.*@)?([a-z0-9-]+\.)*otherdomain\.com(:[0-9]+)?(/.*)?$ [NC]

add as many of these as you need above the RewriteRule line with the domains that you want to allow
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2006-06-16, 02:42 PM   #3
Jensen
Lord help me, I'm just not that bright
 
Join Date: Sep 2003
Location: Norway
Posts: 106
when I have questions like that, I just call BrianH at webair... easy
Jensen is offline   Reply With Quote
Old 2006-06-16, 02:56 PM   #4
RedCherry
Of all the things I've lost, I miss my mind the most.
 
RedCherry's Avatar
 
Join Date: Apr 2004
Location: Middle of the Desert, Pahrump, NV
Posts: 3,187
Send a message via ICQ to RedCherry
Thanks sparky!

Quote:
Originally Posted by cd34
RewriteCond %{HTTP_REFERER} !^http://(.*@)?([a-z0-9-]+\.)*otherdomain\.com(:[0-9]+)?(/.*)?$ [NC]

add as many of these as you need above the RewriteRule line with the domains that you want to allow
RedCherry is offline   Reply With Quote
Old 2006-06-18, 11:22 AM   #5
RedCherry
Of all the things I've lost, I miss my mind the most.
 
RedCherry's Avatar
 
Join Date: Apr 2004
Location: Middle of the Desert, Pahrump, NV
Posts: 3,187
Send a message via ICQ to RedCherry
Thought I'd pass this along, Mike at Phatservers sent me this. The .htaccess generator that is posted in other threads was 404, one of the reasons I started this thread, and this is another good generator.

http://www.htmlbasix.com/disablehotlinking.shtml
RedCherry is offline   Reply With Quote
Old 2006-06-19, 04:58 PM   #6
juggernaut
Registered User
 
juggernaut's Avatar
 
Join Date: Apr 2005
Location: Central Jersey! If I was rich and powerful I would dress as my avatar does.
Posts: 1,448
Send a message via Yahoo to juggernaut
Yeah I know that place I use has been 404 alot latly. Heres another one, I love the huge amount of options. Most generators do standard, username password, bot blocking etc. This is nice

http://cooletips.de/htaccess/
juggernaut is offline   Reply With Quote
Old 2006-06-21, 05:32 AM   #7
upallnite
Internet! Is that thing still around?
 
upallnite's Avatar
 
Join Date: Jan 2006
Location: FL
Posts: 9
Send a message via ICQ to upallnite
Hi RedCherry
Can you show me a movie file that you have protectd with this:

ErrorDocument 404 http://www.mydomain.com/404.shtml
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(.*@)?([a-z0-9-]+\.)*mydomain\.com(:[0-9]+)?(/.*)?$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.*@)?1\.2\.3\.4(:[0-9]+)?(/.*)?$
RewriteRule .*\.(asf|mpg|mpeg|wmv|avi|rm|gif|jpeg|jpg|zip)$ - [NC,F,L]

If anyone has any type of movie file protected with htaccess I would like to try our test on it.
__________________
Zipped Adult Sites 4 fast easy FREE web sites and plug-ins!
upallnite 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 04:31 PM.


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