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

Redirecting URL through ASP

3 views
Skip to first unread message

Zoom

unread,
Jan 8, 2008, 9:25:51 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

McKirahan

unread,
Jan 8, 2008, 9:57:53 AM1/8/08
to
"Zoom" <keas...@hotmail.com> wrote in message
news:K-adnS0AwID7FR7a...@comcast.com...


Will this work for you?

Const cWWW = "http://www.siteb.com/script?"
Response.Redirect cWWW & Request.QueryString()


Zoom

unread,
Jan 8, 2008, 12:29:23 PM1/8/08
to
Appreciate the info. I will try that. However, does ASP have any search
and replace function so that I can take the entire web query such as
http://www.sitea.com/query?query_variables

and simply replace the phrase 'sitea' with 'siteb' and pass that to the
Response.Redirect function.

Thanks

zoom


"McKirahan" <Ne...@McKirahan.com> wrote in message
news:OaWdnRH69M6KEh7a...@comcast.com...

McKirahan

unread,
Jan 8, 2008, 4:26:28 PM1/8/08
to
"Zoom" <keas...@hotmail.com> wrote in message
news:AfGdncriMv33Lh7a...@comcast.com...

> Appreciate the info. I will try that. However, does ASP have any search
> and replace function so that I can take the entire web query such as
> http://www.sitea.com/query?query_variables
>
> and simply replace the phrase 'sitea' with 'siteb' and pass that to the
> Response.Redirect function.

[snip]

Yes, you could use
strURL = Replace(strURL,"sitea","siteb")
where "strURL" contains the URL.

However, your example said that you wanted
http://www.sitea.com/scripts/script?Adata=xxx
redirected to
http://www.siteb.com/script?Adata=xxx
so replacing "sitea" with "siteb" wouldn't work.


0 new messages