I'm in the process of porting a static site into Kentico and want to set up redirects from the old /page.html URLS to the new clean friendly URL '/page'.
In settings > URLs and SEO I've set the following:
Friendly URL extensions: '' (blank)
Redirect page aliases to main URL: checked
Redirect pages to main extension: unchecked
I've then set up a Alias with the following properties:
URL Path: '/page'
URL Extension: '.html'
However when visting http://mysite/page.html I get a 404.
What am I missing? Any help much appreciated.
For global solution you can follow this link. Within Kentico you need to enable extensions for .html under Settings -> URL & SEO -> Friendly URL Extensions if not already to add them as Alias. Check this link to do this within Kentico.
Assuming you have the proper web.config (<modules runAllManagedModulesForAllRequests="true">) it sounds like you're only missing adding the ".html" extension here:
Settings>URL & SEO>Friendly URL Extensions
Brenden - adding '.html' to Settings>URL & SEO>Friendly URL Extensions does the opposite - it forces the friendly URL to redirect from:
Sorry about that, you need to include a blank at the beginning as well so your value should be
The blank at the beginning will cover the extensionless URL setup.
I sussed that and added this:
Friendly URL Extensions ";.html;.aspx"
This now works as expected with a .aspx extension added but not with .html
If you want extensionless URLs you need to make sure you have
I'd already added this and extensionless URLs are already working for .aspx
redirects as expected to:
But I get a 404 on the following:
In your alias on the page, do not include the period.
Your extension should read html not .html
It looks like the runAllManagedModulesForAllRequests attribute was not added into the correct place. It has to be added here.
Please, sign in to be able to submit a new answer.