View Full Version : Blocking domains in htaccess and looking up ip adress
kalle7
2005-04-01, 01:06 PM
|waves| Hi all,
I have some questions that I hope you could help me out with.
There are some sites that are linking to my galleries and free sites and sending loads of traffic (that does not convert). I would like to block these domains from linking to my things, but dont know how to do it. I have blocked fusker and sites like that with my htaccess file, but I have no idea how to block domains or ip adresses.
Also I would like to ask if someone knows how to look up other domains ip adresses. I dont know if I ask the question the correct way so feel free to correct me.
Thanks everybody! |cool|
ArtWilliams
2005-04-01, 01:14 PM
There is a lot of good stuff here:
http://www.htaccesstools.com/
including several scripts which will create the .htaccess for you.
Cheers,
...art
kalle7
2005-04-01, 01:25 PM
Hi Art!
Thanks for that link - I appriciate that! That fixed my linking problem in a sec. I really liked the redirection tool. Now I just gotta find a pay pr click sponsor lol
kalle7
2005-04-01, 01:27 PM
I am still interested in how to look up ip adresses from a domain if someone has got some info on that |viking|
BlueQuartz
2005-04-01, 08:48 PM
hey kalle7 check these links out http://www.dnsstuff.com/ & http://network-tools.com/
whois.sc also provides some reverse lookup capabilities but requires a 'free' registration
GeorgeTH
2005-04-02, 03:18 AM
simple dos prompt tracert does it too:
open "Command Prompt"
type behind the >tracert domain.com
first thing you get is "Tracing route to domain.com [123.456.78.90]"
and then you can see which way the traffic moves, and where it might stall = also good to check own domain
kalle7
2005-04-03, 03:01 PM
Thanks BlueQuartz, cd34 and George!
I will study these places further and try out the tips you have given.
I appriciate your help! |cheers|
BlueQuartz
2005-04-03, 06:42 PM
Thanks BlueQuartz, cd34 and George!
I will study these places further and try out the tips you have given.
I appriciate your help! |cheers|welcome kalle7!!!
kalle7
2005-04-04, 03:18 PM
I seem to have a problem getting this domain blocking thing to work in htaccess:
This one works:
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://www.top-teen-sex.com/
RewriteRule /* http://www.google.com [R,L]
But if I add one more domain to the blocking list it does not work anymore:
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://www.top-teen-sex.com/
RewriteCond %{HTTP_REFERER} ^http://sex-in-school.com/
RewriteRule /* http://www.google.com [R,L]
Does anyone know what I am doing wrong and can suggest a better way to do this. I also tried the http://www.htaccesstools.com/block-hitbots/ , but it only works with one domain blocked. Drives me nuts lol
RewriteRule .* http://www.google.com [R,L]
kalle7
2005-04-04, 03:43 PM
Hi cd34, thank you for the tip, but I still does not work on multiple banned domains.
When I have just one domain it works, but not on several. Could it be something wrong with my server? Any ideas?
kalle7
2005-04-04, 07:26 PM
Seems like I have found a solution to my problem and will post it here if someone else needs it also.
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://www.domain-name.com/ [OR]
RewriteCond %{HTTP_REFERER} ^http://www.domain-name.com/ [OR]
RewriteRule /* http://www.google.com [R,L]
Perhaps one of the moderators would be so kind to remove the old ones where I have posted the domains that have linked to me so that they will not get any SE attention. I thought I could remove it after, but I dont have the option. Thanks!
kalle7
2005-04-04, 07:59 PM
Please do not use the code I have posted above. I thought it would work, but it redirects all traffic and that was not the purpose. I am very sorry about this and I am still open to suggestions on problem. Thanks!
kalle7
2005-04-04, 09:11 PM
Sorry for making a huge mess here, but now I have got it working lol
http://www.htaccesstools.com/block-hitbots/ Make sure you put in the domains like this: domainname.com/ or else it will not work.
vBulletin® v3.8.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.