Configuration of extension-less URLs

This chapter describes how to configure the system for using extension-less URLs, such as

http://www.mydomain.com/products/kenticocms

instead of

http://www.mydomain.com/products/kenticocms.aspx

 

Prerequisites

 

You can use this configuration on Windows XP, Windows 2000 and Windows Server 2003 with Internet Information Services (IIS) installed. It's not possible to use it with Visual Studio 2005 built-in web server.

 

Configuration

 

Go to Start -> Control Panel -> Administrative Tools and launch the Internet Information Services (IIS) Manager. Locate the appropriate web site and virtual directory (if you installed Kentico CMS into the root, you will make this change on the web site level only).

 

clip0043

 

Right-click the directory (or web site) and choose Properties and then click the Custom Errors tab:

 

clip0044

 

Edit the 404 error and enter the following values:

 

Message type: URL
URL: enter the URL of page cmspages/handler404.aspx according to your applications URL.
       Example: if you run your web project in virtual directory /kenticocms, you need to enter /kenticocms/cmspages/handler404.aspx

 

clip0045

 

 

Now repeat the same for the 405 error, using the same custom URL: /kenticocms/cmspages/handler404.aspx

 

Click OK on all dialogs to save the changes. It's not necessary to restart the application.

 

Now go to Kentico CMS Site Manager -> Settings. Choose either the global configuration or site-specific configuration and choose the URLs configuration section. Clear the Friendly URL extension textbox value to and click Save.

 

Now when you go to the live web site, you will see that all URLs in menus and listings are rendered without extension. You may, however, need to update some static links that were created with default .aspx extension.