Kentico CMS 6.0 Context Help

URLs

URLs

Previous topic Next topic Mail us feedback on this topic!  

URLs

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

Document alias

The unique name of the document in the given section of the website. This name doesn't change when you modify the document name and it's used:

1.To define the AliasPath, which is the unique path to the document. The developers typically use the AliasPath in the Path property of the web parts and controls.

 

2.For the URL of the document. The URL of the document is like
www.kentico.com/products/cms.aspx
where /products/cms is the alias path of the document.

 

Forbidden characters

 

Some characters are forbidden in URLs and thus they are replaced with a safe character (by default, it's dash -). You can specify the forbidden characters and the replacement character in Site Manager -> Settings -> URLs and SEO, in values of the "Forbidden characters replacement" and "Forbidden URL characters" properties.

Document URL path

If you want to use a specific URL for a document that doesn't depend on its Alias path, you need to check the Use custom URL path box and enter a different value.

 

You can choose from the following Path types for the custom URL:

 

Standard URL or wildcard - the URL will be handled by the standard Kentico CMS rewriting engine.
Route - the URL will be processed as an ASP.NET Route pattern.
MVC - requests to the URL will be handled as requests for an MVC page. Please see the MVC development model chapter in the Developer's Guide for more information.

 

The selection made here determines how the value of the Path or pattern field will be processed. For MVC or Route patterns, it is always necessary to include the URL extension at the end of the path. If you leave the path without an extension, the document will automatically be available under an extensionless URL.

 

If MVC is selected, you must also specify the following values:

 

Default controller - the name of the MVC controller containing the action that should be performed when the alias URL is accessed, without the Controller part at the end. E.g. if the controller class is called NewsMVCController, enter NewsMVC. The specified controller is first searched in the CMS.Controllers.<current site code name> namespace. If it is not found there, it is searched in the CMS.Controllers.Global namespace.
Default action - specifies the action defined within the controller that should be performed when the alias URL is accessed.

 

The URL path must always start with /. When entered, the document will be accessible under two URLs. This can be useful if you need to define a short URL for a page or need to optimize the URL for search engines.

 

The URL path is, unlike the alias path, culture-specific. This means if you use URL paths:

/product (for the English version)

/produkt (for the German version)

 

Then when the user comes to /produkt.aspx, the language of the website is automatically switched to German.
 
The URL path may contain wildcard URLs or MVC or Route patterns. Wildcards use the following format: {wildcard} or {wildcard;defaultvalue}, where wildcard is the name of the wildcard and defaultvalue its value if the URL is used without a wildcard being entered. More information can be found at Wildcard URLs.

URL extensions

Default URL extensions are defined in Site Manager -> Settings -> URLs and SEO -> Friendly URL extensions. If you check the Use custom URL extensions check box, you can define other extensions under which the document can be accessed.

 

In case that the option is disabled, physical file extensions can also be used for cms.file documents.

 

Multiple extensions can be entered divided by a semicolon. If you enter a semicolon without any extension, extensionless URLs will be allowed.

 

Example: entering .htm;; for a document with a URL path set to /test will allow the document to be accessed through both of the URLs below:

 

<site path>/test.htm
<site path>/test

 

For this to work, you also need to to set up your IIS for handling 404 and 405 errors as described in the Installation and deployment -> Additional configuration tasks -> Custom URL extensions chapter of the Developer's Guide.

Document aliases

This section displays a list of other document aliases under which the document can be accessed. One document can have an unlimited number of aliases. You can edit (Edit) and delete (Delete) aliases in the list or create a new alias using the 'Add new alias' link. After clicking the ArrowBottom icon in the header of the Actions column, a context menu is displayed, offering options for export of listed data to various types of files.
 
If the Remember original URLs when moving documents setting is enabled in Site Manager -> Settings -> URLS and SEO, new document aliases containing the original URL properties will automatically be created whenever the Document URL path or URL extensions properties are changed.