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 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 with current culture. It can optionally search also for other default culture version of the same document in case the required culture version is not available - this can be set in Site Manager -> Settings -> website -> Combine with default culture.

 

3.If such 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 for its displaying and call the appropriate page template like /products.aspx?aliaspath=/prodcuts/kentico-cms. The page template is responsible for displaying of the document. If the document doesn’t have any page template specified, the URL rewriting engine tries to find the page template of the parent and use it. If the page is managed by a 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 to 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/devguide/index.html?url_rewriting.htm