Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Redirect spiders to a blank page
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

lsakizada
New Member

USA
90 Posts

Posted - 07 February 2006 :  05:34:54  Show Profile
Hi guys,
how to redirect spiders wo request the post.asp or any other file to a blank page? any idea?

need to reduce memory consumptions on my servers

Sonic
New Member

Germany
82 Posts

Posted - 07 February 2006 :  06:02:50  Show Profile  Visit Sonic's Homepage
use this code from Marcel G


userAgent = Request.ServerVariables("HTTP_USER_AGENT")

'############### Spider
If inStr(userAgent,"bot") > 0 or _						
	 inStr(userAgent,"perl") > 0 or _
	 inStr(userAgent,"java") > 0 or _
	 inStr(userAgent,"libw") > 0 or _
	 inStr(userAgent,"crawl") > 0 or _
	 inStr(userAgent,"DA ") > 0 or _
	 inStr(userAgent,"msn") > 0 or _
	 inStr(userAgent,"google") > 0 or _
	 inStr(userAgent,"download") > 0 then

Response.Redirect "spider_site.asp"

end if


put this in the top of inc_header.asp

ich finds genial...
bei uns ist es ratzekuz dunkel und bei dene alle heller nachmittag
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 07 February 2006 :  06:35:19  Show Profile
quote:
how to redirect spiders wo request the post.asp or any other file to a blank page? any idea?


ANY other file ? So you don't want spiders at all ? Won't robots.txt fix that ?
quote:

need to reduce memory consumptions on my servers

I would have thought redirecting them to another page would increase the usage ?
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 07 February 2006 :  06:51:03  Show Profile  Visit MarcelG's Homepage
quote:
Originally posted by laser

quote:
need to reduce memory consumptions on my servers

I would have thought redirecting them to another page would increase the usage ?

Depends ; if post.asp takes 100 kilobyte bandwidth, and 0,2 seconds of CPU time, and the page you redirect them to takes 100 bytes of bandwidth and 0,00001 second of CPU time, you're saving resources.

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

lsakizada
New Member

USA
90 Posts

Posted - 07 February 2006 :  07:00:14  Show Profile
quote:
put this in the top of inc_header.asp


Do you mean to insert it in top of each page that the spider
should not requst it?
or is there any logic that can handle it in inc_header.asp?
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 07 February 2006 :  07:49:31  Show Profile  Visit MarcelG's Homepage
lsakizada ; you should indeed not use it in inc_header.asp, but in each page you wish to block.
If you put it in inc_header.asp all spider traffic will be redirected, and that's not what you want.

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

lsakizada
New Member

USA
90 Posts

Posted - 07 February 2006 :  15:11:55  Show Profile
Thank you very much MarcelG & Sonic for the help and the code.
I guess the code above does not contain all the spiders, right?

Thanks again!
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 08 February 2006 :  03:19:58  Show Profile  Visit MarcelG's Homepage
It covers >90% of them, so you're in the safe zone now.

portfolio - linkshrinker - oxle - twitter
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.41 seconds. Powered By: Snitz Forums 2000 Version 3.4.07