Rank: Administration
Groups: Administration
Joined: 10/8/2008(UTC) Posts: 190  Was thanked: 1 time(s) in 1 post(s)
|
If you are planning to change the domain for a site you can use this source, this source makes sure that all the path and queries are forwarded one on one to the new site domain. Code:Dim host as string = httpcontext.current.request.url.host
Dim PathAndQuery as string = httpcontext.current.request.url.PathAndQuery
Dim newhost as string = "<full site url including www>"
If host <> newhost Then
Dim newUrl as string = ""
Dim RawUrl as string = httpcontext.current.request.RawUrl
Dim Scheme as string = httpcontext.current.request.url.Scheme
newUrl = Scheme & "://" & newhost & RawUrl
Response.Status = "301 Moved Permanently"
Response.AddHeader("Location", newUrl)
End If
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The Sienn Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close