URL rewriting

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

Kentico CMS uses a system of friendly URL addresses. It allows you to use URLs like:

 

http://www.example.com/products/kentico-cms.aspx

 
instead of

 
http://www.example.com/products.aspx?id=527

 

Every document has its own URL. When multiple languages are used, the document is recognized either using its URL path (if specified) or using a combination of alias path and preferred culture that is stored in a cookie.

 

URL processing

 

1. The system gets the incoming request http://www.example.com/products/kentico-cms.aspx and looks up the website based on the domain name (either on the main domain name or domain aliases). If it doesn’t find any running website, it displays the page /cmsmessages/invalidwebsite.aspx. If the domain name with the required port number is not found, it also tries to find a site with the same domain name without any port number.

 

2. Then it looks up a document with alias path equal to /products/kentico-cms and in the current culture. It can optionally also search for the default culture version of the same document in case the required culture version is not available - this can be set in Site Manager -> Settings -> Web site -> Combine with default culture.

 

3. If such a URL path is not found, the system tries to find a document with URL path /products/kentico-cms.

 

4. If no document is found for the requested URL, the system doesn't process the request and the web server displays the standard 404 – Page not found error.

 

5. If the requested document is found, the URL rewriting engine looks up which page template should be used to display it and calls the appropriate page template like this: /products.aspx?aliaspath=/prodcuts/kentico-cms. The page template is responsible for the displaying of the document. If the document doesn’t have any page template specified, the URL rewriting engine tries to find and use the page template of the parent document. If the page is managed by the portal engine, the page called is /cmspages/portaltemplate.aspx, which is a page that renders the page from web parts.

 

The system of “friendly” or “smart” URLs provides several benefits:
 

They are easy to remember and easy to write into the browser address bar.
They are friendly towards search engines (SEO friendly).
They show users where they are located on the website.
You can easily send the URL of the document to your friends and they will see the same page with the particular document.

 

Page url: http://devnet.kentico.com/docs/5_5r2/devguide/index.html?url_rewriting.htm