Forum Moderators: open

Message Too Old, No Replies

Having some troubles

         

Semitracks

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

10+ Year Member



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
^

Semitracks

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

10+ Year Member



Sorry, the Server.Redirect line should read:

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

mole

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

10+ Year Member



try "End If" rather then "Endif"

Semitracks

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

10+ Year Member



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