Redirecting to Umbraco is usually a very simple matter, unless you are trying to redirect from the root of your site.
Method 1:
Here he best explains: http://our.umbraco.org/wiki/reference/umbraco-best-practices/umbracoredirect
Thus, it is possible by adding the umbracoInternalRedirectId
property to your root node, with the Content Picker data type. Please note that it does not redirect the user, but loads the contents of this page inside the current URL. That way, the URL will remain http://www.mysite.com
while it serves the content of the page you want to redirect to.
Method 2:
If you really want it to change from http://www.mysite.com/
to http://www.mysite.com/index.aspx
. I usually add something like the following code to the node root pattern.
<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %> <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server"> </asp:Content> <script type="c#" runat="server"> protected void Page_Load(object sender, EventArgs e) { Response.Redirect("http://www.mysite.com/index.aspx"); } </script>
So ASP.Net is responsible for the redirect. But it obviously will not handle node renaming / moving too well.
source share