Welcome to WebmasterWorld Guest from 18.204.48.199

Forum Moderators: ocean10000

Message Too Old, No Replies

Having some troubles

     
4:46 pm on Nov 29, 2005 (gmt 0)

New User

10+ Year Member

joined:Nov 18, 2005
posts:5
votes: 0


I'm trying to implement a URL redirect via ASP as we are not using Apache on our webserver. We're wanting to allow spiders to index pages behind a login screen and redirect browsers to a registration/sign-in page (we got the idea from an article on the IEEE website we ran across while doing some research). Below is the code placed before the html for the page, and also the error I keep getting. Any help is appreciated, as I'm fairly new to ASP.

CODE:
<%
Dim Spidercheck
Spidercheck = UCase(Request.ServerVariables("http_user_agent"))
If Spidercheck = "GOOGLEBOT" Then
Server.Redirect("/internet/index.htm")
EndIf
%>

ERROR:
Microsoft VBScript compilation error '800a0400'

Expected statement

/online-training.asp, line 6

EndIf
^

4:47 pm on Nov 29, 2005 (gmt 0)

New User

10+ Year Member

joined:Nov 18, 2005
posts:5
votes: 0


Sorry, the Server.Redirect line should read:

Server.Redirect("/internet/index.asp"), not .htm

4:52 pm on Nov 29, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 21, 2002
posts:160
votes: 0


try "End If" rather then "Endif"
4:59 pm on Nov 29, 2005 (gmt 0)

New User

10+ Year Member

joined:Nov 18, 2005
posts:5
votes: 0


I hate when it's something that simple! Thanks :).