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).
Right-click the directory (or web site) and choose Properties and then click the Custom Errors tab:
Edit the 404 error and enter the following values:
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. |