
URL, Getting the url using asp
On Mon, 31 May 1999 08:58:43 +0200, Coenie Richards
You need also to have the QueryString
There I made a redirection from www.ancient_site.com to
www.new_site.com with the same query.
basically the site is the same, but we want to change the DNS because
users must forget the ancient.
<%
Dim hostage, dirpath, query
hostage=Lcase(Request.ServerVariables("SERVER_NAME"))
dirpath=Request.ServerVariables("PATH_INFO")
query=Request.ServerVariables("QUERY_STRING")
if query<>"" then
query="?"&query
end if
if hostage="www.ancient_site.com" then
Response.redirect"http://www.new_site.com"&dirpath&query
end if
End if
%>
Quote:
>Thanks.
>One more thing the url result wich I am getting i can not use to
>redirect with any idea how I can decode the url and the redirect?
>> Coenie,
>> Try:
>> http://www.somedomain.com/user/no.asp?" &
>> erver.URLEncode( Request.ServerVariables( "HTTP_REFERER" ) )
>> Nic Roche
>> Net Extra
>> www.extra.net.au
>> >Hi
>> >I want to get the URL using asp and pass it on to a other page.
>> >Example.
>> >http://www.somedomain.com/user/create.asp?action=create&ask=no
>> >then create.asp should pass on this url like this
>> >http://www.somedomain.com/user/no.asp?url=http://www.somedomain.com/u...
>> eate.asp?action=create&ask=no
>> >I hope some can help
>> >Kind regards
>> > Coenie Richards