I need to redirect all of the legacy .htm
urls for my website to extensionless urls, so:
http://www.website.com/page.htm --> http://www.website.com/page
I created the following rule in config/UrlRewriting.config, which fixed the above issue, but created an issue where all of the backoffice paths are returning 404:
<add name="HtmToExtensionless"
redirect="Domain"
ignoreCase="true"
rewriteUrlParameter="IncludeQueryStringForRewrite"
virtualUrl="http://www.website.com/(.*)(\.htm)"
redirectMode="Permanent"
destinationUrl="http://www.website.com/$1" />
So requests like these are returning 404:
http://www.website.com/umbraco/views/components/application/umb-navigationl?umb__rnd=7.4.2.1536555776
I'm pretty sure my problem is with my regex, but I'm not sure. Anyone care to advise?