Reputation: 2395
I'm using Umbraco 4.7 and I am trying to use the UrlRewriting.config file to set up a domain level URL redirect.
So for example, if a user hits the website at the following URL
www.OLD-Domain.com/join.aspx
I want rewrite the URL permanently to:
www.NEW-Domain.com/join.aspx
I'm hoping that the search engines will be able to see this too when they next visit the site to re-index it.
Examples/Ideas please?
Upvotes: 0
Views: 347
Reputation: 2215
If you don't want to use IIS redirects or sites to do this, then you can use an Umbraco config file to do the job for you:
Go to your "Config" directory in your main Umbraco website directory.
Edit the "URLRewriting.config" file in your favorite text editor.
Add the following code between the (paste here) tags:
<add name="SEOfix" virtualUrl="^http://domain.com/(.*)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="http://newdomain.com/$1" redirect="Domain" redirectMode="Permanent" ignoreCase="true" />
<add name="SEOfixSSL" virtualUrl="^https://domain.com/(.*)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="https://newdomain.com/$1" redirect="Domain" redirectMode="Permanent" ignoreCase="true" />
See more at: http://www.proworks.com/blog/2011/03/31/permanent-301-redirect-domaincom-to-wwwdomaincom-in-umbraco/
Upvotes: 0