Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   General Business Knowledge (http://www.greenguysboard.com/board/forumdisplay.php?f=10)
-   -   Need a .htaccess expert for this one please? (http://www.greenguysboard.com/board/showthread.php?t=15834)

lux_interior 2005-01-28 05:14 AM

Need a .htaccess expert for this one please?
 
I thought I had my .htaccess set up ok and most sites that need blocking are blocked but as many of my sites are Asian content I seem to be a constant target.

Anyway there are a few url's that I can't seem to block and I've no doubt it's an error on my .htaccess. The ones getting through include:

http://www.aladding.com/
http://www.xiaosese.com/
http://photo.aisex.com/
http://xiaosese.com/
http://209.120.238.36/
http://www.xiaosese.net/
http://www.beyond8.com/
http://www.atv8.com/
http://aladding.com/
http://www.919120.com/
http://127.0.0.1-6-fg/
http://atv8.com/

My current .htaccess looks like this:

RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP_REFERER} ^.*a4ybbs.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*ourvenus.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*aladding.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*xiaosese.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*aisex.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*beyond8.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*atv8.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*919120.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*hostflofree.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*websamba.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*111-222.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*hylover.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*nudeangel.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*nudeangelbbs.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*amandalist.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*chatropolis.*$ [NC]
RewriteRule /* http://www.a-world-of-sex.com/ex/ [R,L]

ErrorDocument 404 http://www.a-world-of-sex.com/ex/

Can anybody suggest what's wrong with it and why the above domain names are still able to hotlink?

Cheers in advance

Lux

cd34 2005-01-28 05:27 AM

Try

RewriteRule .* http://www.a-world-of-sex.com/ex/ [R,L]

Nickname 2005-01-28 06:00 AM

how would a simple .htaccess look if you want to only let certain domains hotlink your pics and movies and all others to go to a redirect?

Kappi 2005-01-28 06:15 AM

maybe this can help you out:
http://www.htaccesstools.com/block-hitbots/

swedguy 2005-01-28 06:22 AM

Have in mind that by redirecting all hotlink traffic to that page you will use up more bandwidth than just the single picture they are hotlinking.

The page you redirect to is 367kB including all pictures. So it's just to calculate what the total bw used is if they hotlink 10, 50 or 100 pics. It adds up.

If bandwidth is a concern, use this RewriteRule instead:

RewriteRule .* - [F]

lux_interior 2005-01-28 06:25 AM

Thanks for all the suggestions guys but they're still sneakng through :(

Lux

Kappi 2005-01-28 06:28 AM

RewriteRule .* - [F]
what does this do?

lux_interior 2005-01-28 07:12 AM

Quote:

Originally Posted by swedguy
Have in mind that by redirecting all hotlink traffic to that page you will use up more bandwidth than just the single picture they are hotlinking.

The page you redirect to is 367kB including all pictures. So it's just to calculate what the total bw used is if they hotlink 10, 50 or 100 pics. It adds up.

If bandwidth is a concern, use this RewriteRule instead:

RewriteRule .* - [F]

Thanks for that and I hear ya! The way I figure it is I stand a vague chance of selling something off that page where as when somebody just link directly to a pic I've got zero chance. You do raise an interesting point though. Maybe for the asian traffic I'll redirect to an asian sponsor rather than my generic 404 page.

On your second point would you care to expand a bit as I'm not really too hot on .htaccess |waves|

Thanks again for your intelligent response.

Lux

eskimoen 2005-01-28 07:42 AM

Quote:

RewriteRule .* - [F]
Means that a 403 Forbidden http response will be sent to the browser. If you have a ErrorDocument 403 in your htaccess the surfer will be redirected to this url.

http://www.htaccesstools.com/block-hitbots/ allows you to block or redirect the hitbots or what ever it is. If you do not set a "Redirection URL" hits will just be blocked.

lux_interior 2005-01-28 08:17 AM

Quote:

Originally Posted by eskimoen
Means that a 403 Forbidden http response will be sent to the browser. If you have a ErrorDocument 403 in your htaccess the surfer will be redirected to this url.

http://www.htaccesstools.com/block-hitbots/ allows you to block or redirect the hitbots or what ever it is. If you do not set a "Redirection URL" hits will just be blocked.

Thanks for the clarification.

I tried that tool and generated a .htaccess file but still some of the sites seem to be able to access my sites.

Lux

eskimoen 2005-01-28 10:13 AM

Quote:

Originally Posted by lux_interior
Thanks for the clarification.

I tried that tool and generated a .htaccess file but still some of the sites seem to be able to access my sites.

Lux

It generates a htaccess that blocks based on http referer. You can not block ips with this method.

I just added a new tool, Block IPs. Use this if you want to block based on ip instead of http referer.
http://www.htaccesstools.com/block-ips/

tiny 2005-01-28 10:23 AM

Try a
deny from (numeric iaddress)

Osiris 2005-01-28 01:54 PM

Quote:

Originally Posted by eskimoen
It generates a htaccess that blocks based on http referer. You can not block ips with this method.

I just added a new tool, Block IPs. Use this if you want to block based on ip instead of http referer.
http://www.htaccesstools.com/block-ips/

Is that your site? Someone showed this to me a good while back and I always thought it kicked ass since I don't know much of anything about .htaccess

I'm still having trouble combining 2 .htaccess files into one.. I need hotlink protection and hitbot blocking all in one.. When I put all the code into one .htaccess I mess everything up! :(

Wazza 2005-01-28 03:35 PM

Are you clearing your cache prior to checking if they can hotlink?

GenXer 2005-01-28 06:53 PM

What I do on my sites is just .htaccess allow certain sites to hotlink and disallow ALL others

chilihost 2005-01-29 03:22 AM

Quote:

Originally Posted by GenXer
What I do on my sites is just .htaccess allow certain sites to hotlink and disallow ALL others

That is the best thing to do especially when you are a target for asian forum hotlinkers. Have you gone to the forums and seen how they hotlinked? Sometimes they use proxies (like safeurl) and other domain names to do the actual hotlinking and they change their referral info to mess around with your logs and htaccess files. I would recommend going to their website, finding the exact pages where you are hotlinked and viewing their code to see if you can decipher it.

Good luck!

cheers,
Luke

lux_interior 2005-01-29 03:54 AM

Quote:

Originally Posted by chilihost
That is the best thing to do especially when you are a target for asian forum hotlinkers. Have you gone to the forums and seen how they hotlinked? Sometimes they use proxies (like safeurl) and other domain names to do the actual hotlinking and they change their referral info to mess around with your logs and htaccess files. I would recommend going to their website, finding the exact pages where you are hotlinked and viewing their code to see if you can decipher it.

Good luck!

cheers,
Luke


Nice idea Luke thanks! I'd looked at the sites but didnt thnk about looking at the code. I'll give it a go.

Lux

eskimoen 2005-01-29 12:28 PM

Quote:

Originally Posted by Osiris
Is that your site? Someone showed this to me a good while back and I always thought it kicked ass since I don't know much of anything about .htaccess

I'm still having trouble combining 2 .htaccess files into one.. I need hotlink protection and hitbot blocking all in one.. When I put all the code into one .htaccess I mess everything up! :(

Yes, its mine. :)

Feel free to post your htaccess questions on http://www.htaccesstools.com/board/

BlueQuartz 2005-01-29 01:16 PM

have you sorted out the problem yet?


blocking each site that is hotlinking you is NOT the way to do it

you need a htacess file that allows traffic from YOUR domain(s) and blocks EVERYONE else from hotlinking you

let me know if you need a hand we will have it sorted real qwik for ya :)

Osiris 2005-01-29 04:03 PM

Quote:

Originally Posted by eskimoen
Yes, its mine. :)

Feel free to post your htaccess questions on http://www.htaccesstools.com/board/

Excellent, will do!

digifan 2005-01-30 07:07 AM

Quote:

Originally Posted by BlueQuartz
have you sorted out the problem yet?


blocking each site that is hotlinking you is NOT the way to do it

you need a htacess file that allows traffic from YOUR domain(s) and blocks EVERYONE else from hotlinking you

let me know if you need a hand we will have it sorted real qwik for ya :)

BlueQuarz,

this sounds just awesome... wondering if asking a badly needed helping hand is fine with you?

tia,

digifan
|cool|


All times are GMT -4. The time now is 11:29 PM.

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