Hi
We have a domain that is hosted on a shared server (so no access to IIS etc if relevent), the domain is currently in a root folder but now there is a need to change this so that the domain is in a sub folder accessed by domain/folder/page, due to changes by the host (don't ask why! I will be changing the host when I have time, but currently I am trying to sort a solution)
However I am keen not to loose the searchengine links and rankings hence url re-writing.
So I have the code below which appears to be ok at remapping the paths.
My only final concern is that when the user types domain.com they will hit the root folder, which then through a default.asp script redirect them to domain.com/folder/default.aspx, but how can show the url as "domain.com/default.aspx"?
Thanks in advance
B
Dim fullOrigionalpath As String = Request.Url.ToString()
If InStr(fullOrigionalpath.ToLower, "mydomain/folder/") = False Then
Context.RewritePath("/folder" & fullOrigionalpath.ToLower)
'ElseIf
'code here required if the URL is "mydomain/folder"
End If
We have a domain that is hosted on a shared server (so no access to IIS etc if relevent), the domain is currently in a root folder but now there is a need to change this so that the domain is in a sub folder accessed by domain/folder/page, due to changes by the host (don't ask why! I will be changing the host when I have time, but currently I am trying to sort a solution)
However I am keen not to loose the searchengine links and rankings hence url re-writing.
So I have the code below which appears to be ok at remapping the paths.
My only final concern is that when the user types domain.com they will hit the root folder, which then through a default.asp script redirect them to domain.com/folder/default.aspx, but how can show the url as "domain.com/default.aspx"?
Thanks in advance
B
Dim fullOrigionalpath As String = Request.Url.ToString()
If InStr(fullOrigionalpath.ToLower, "mydomain/folder/") = False Then
Context.RewritePath("/folder" & fullOrigionalpath.ToLower)
'ElseIf
'code here required if the URL is "mydomain/folder"
End If