Welcome Guest! To enable all features please Login. New Registrations are disabled.



Go to last post Go to first unread
#1 Posted : Monday, January 12, 2015 1:32:20 PM(UTC)

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.

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

Wanna join the discussion?! Login to your Sienn Forum forum account. New Registrations are disabled.

Users browsing this topic
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.