Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

URL Redirect via ASP

4 views
Skip to first unread message

Zoom

unread,
Jan 8, 2008, 9:26:03 AM1/8/08
to
HI,

I am trying to do something very simple via a ASP script but can't figure
out how to do it.

Whenever a user goes our our website eg.
(http://www.sitea.com/scripts/script?Adata=xxx), I want it recirected to

http://www.siteb.com/script?Adata=xxx

I can do the simple direct via an REDIR.ASP script but cannot figure out how
to pass the rest of the data after www.sitea.com -> scripts/script?Adata=xxx
so that it gets passed along as well in the new redirect.

Any help would be appreciated.

Chris

JPElectron

unread,
Feb 24, 2008, 12:22:33 AM2/24/08
to
try setting this as your custom 404 error page, use type URL: /
error.asp

<%
fullURL = LCase(Request.ServerVariables("HTTP_REFERER"))

If Instr(fullURL,"/scripts/")>0 Then
trynew = LCase(right(fullURL, len(fullURL)-22))
Response.Write ("<font face=""Verdana"" style=""font-size:
8.5pt"">Try <a target=""_top"" href=""http://www.sitea.com" & trynew &
""">www.sitea.com" & trynew & "</a> instead?<br>")
End If
%>

0 new messages