Yes, that partly solved the problem. The navigation is now pointing to the URL without the .aspx extension, but the URL with the extension is still accessible... I would like all the URLs with the .aspx extensions to automaticly redirect (301) to the URL without the extension, so I won't have any SEO problems with duplicate content.
I think that is achieved in the URL rewrite config, but I just don't know what to ad in the config file.
How to get URL's without .apsx extension?
Can anyone tell me how I can add a rewrite to remove the .aspx extension from my URL's.
I would like all my URLs to look like this:
www.mysite.dk/page1
instead of this:
www.mysite.dk/page1.aspx
This can be turned off in the web.config file.
Change the appSettting umbracoUseDirectoryUrls to true
Dave
Hi Dave
Yes, that partly solved the problem. The navigation is now pointing to the URL without the .aspx extension, but the URL with the extension is still accessible... I would like all the URLs with the .aspx extensions to automaticly redirect (301) to the URL without the extension, so I won't have any SEO problems with duplicate content.
I think that is achieved in the URL rewrite config, but I just don't know what to ad in the config file.
Maybe you know?
Hi Inmedia,
I normally install this package. This will add some rewrite rules to your web.config. It solves the aspx issue as well if i'm correct
https://www.nuget.org/packages/RedirectRules/
Dave
Hi Inmedia
Take a look at this 24days in Umbraco article about useful redirect rules for SEO in Umbraco:
http://24days.in/umbraco/2014/redirect-rules/
the following may match the aspx pages:
Hey Marc,
Nice...now I remember how I found this nuget package :-)
Dave
Hi Dave
Yes, sorry didn't refresh my browser before replying!, I have essentially repeated your answer... :-) hopefully article is a good read anyway.
is working on a reply...