URL Rewrite crashes site - Trying to rewrite all .HTML to remove

Jason Buck asked on January 23, 2018 01:34

I have read the following articles:

https://docs.kentico.com/k10/configuring-kentico/configuring-page-urls/extensionless-and-custom-urls

https://docs.kentico.com/k9/configuring-kentico/configuring-page-urls#ConfiguringpageURLs-ExcludingURLsfromtherewritingengine

I have a good understanding of the rewrite process, so I figured I needed go the custom route with

http://devnet.kentico.com/docs/10_0/api/html/T_CMS_Helpers_URLHelper.htm

I am trying to write a URL based on the following:

There are tons of links out on the internet that point to mysite.com/directblah/pagename.html In creating Kentico, I have create all of these pages with the correct path or a page alias.

But just incase I have missed any, I would like all incoming links with .HTML to have the HTML removed.

When I add URL Rewrite rules to my web.config, the site crashes everytime. Did I miss something?

It would be nice if we could be a !.html to force the redirect to the default extension. 1. Open the Settings application. 2. Select the URLs and SEO category. 3. Set the Friendly URL extensions setting to an empty value. 4. Click Save.

My step 3 is NULL (empty value). So why can't I direct all .HTML requests to NULL.

TIA.

Jason

Correct Answer

Brenden Kehren answered on January 23, 2018 01:41

Do you have the URL Rewrite module installed on your server? If not it will crash your site.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Jason Buck answered on January 23, 2018 01:49

DOH!

Thank you. I missed that one. All good now.

The hours of wasted research.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.