...
AMR is high configurable plugin, you can set how your url should looks like through dirrefent settings(see screenshot below).
In Settings area you can make AMR related settings:
Plugin settings
Enable AMR: through this setting you can enable and disable plugin without deactivation in plugin manager.
Path to .htaccess from DocumentRoot: with this setting you have to define path to the CONTENIDO client from your document root.
Example: http://www.my-contenido-doc-rooot.domain point to the main CONTENIDO folder, you path will be /cms/ -> where "cms" is you CONTENIDO client.
Are several clients maintained in one directory?: If you have more then one client in your CONTENIDO installation, you can prepend client to your url and use client name instead of id.
Example: http://www.my-contenido-doc-rooot.domain/cms/some-funky-article.html instead of http://www.my-contenido-doc-rooot.domain/1/some-funky-article.html
Should the language appear in the URL (required for multi language websites)?: with this setting you can prepend language to your url and use language name instead of id.
Example: http://www.my-contenido-doc-rooot.domain/cms/de/some-funky-article.html instead of http://www.my-contenido-doc-rooot.domain/cms/1/some-funky-article.html
Should the name of root category be displayed in the URL?: with this setting you can add the start category to the url's.
Example: If enabled, the name of the root category (e. g. "Mainnavigation" in a CONTENIDO default installation), will be preceded to the URL.
Configure your own separators with following 4 settings
to control generated URLs to your own taste
Category separator: with this setting you can enter category separator you wish. The possible separators you can see right of the inputs.
Example: If your separator is slash your url will looks like this example. http://www.my-contenido-page.domain/mymaincategory/mysubcategory/article.html
Category-word separator (delemiter between category words): with this setting you can set category words separator. Taht means if your category has more the one word, the separator will replace blanks.
Example: If your category word separator is underscore your url will looks like this example. http://www.my-contenido-page.domain/my_category_with_blanks/article.html
Category-article separator (delemiter between category-block and article): with this setting you can select your separator between category and article name.
Example: If your category word separator is underscore your url will looks like this example. http://www.my-contenido-page.domain/mycategory_myarticle.html
Article-word separator (delemiter between article words): with this setting you can set separator between article words. Article words blanks will be replaced with this separator.
Example: If your category word separator is minus your url will looks like this example. http://www.my-contenido-page.domain/mycategory/my-article-with-blanks
Append article name to URLs: this settngs appends article name to url. This setting rewrites article names to defined name.
File extension at the end of the URL: this setting defines file extension at the end of the url
Should the URLs be written in lower case?: this setting generates url in lowercase.
Example: http://www.my-contenido-page.domain/MyCategory/MyArticle.html will look like http://www.my-contenido-page.domain/mycategory/myarticle.html
Duplicated content: this setting prevent duplicated content. Depending on configuration, pages could be found thru different URLs. Enabling of this option prevents this.
Examples for duplicated content:
- Name of the root category in the URL: Feasible is /maincategory/subcategory/ and /subcategory/
- Language in the URL: Feasible is /german/category/ and /1/category/
- Client in the URL: Feasible is /client/category/ und /1/category
Percentage for similar category paths in URLs: This setting refers only to the category path of a URL. If AMR is configured to prepend e. g. the root category, language and/or client to the URL, the specified percentage will not applied to those parts of the URL.
A incoming URL will be cleaned from those values and the remaining path (urlpath of the category) will be checked against similarities.
Example: 100 = exact match with no tolerance; 85 = paths with little errors will match to similar ones; 0 = matching will work even for total wrong paths
Redirect in case of invalid articles: This setting provides redirecting to the other article, if requested article was not found.
Moment of URL generation: this setting provides point of url generation.
a) Clean-URLs will be generated during page output. Modules/Plugins are able to generate URLs to frontend
as usual as in previous CONTENIDO versions using a format like "front_content.php?idcat=1&idart=2".
The URLs will be replaced by the plugin to Clean-URLs before sending the HTML output.
Differences to variant b.):
- Still compatible to old modules/plugins, since no changes in codes are required
- All occurring URLs in HTML code, even those set by wysiwyg, will be switched to Clean-URLs
- All URLs will usually be collected and converted to Clean-URLs at once.
Doing it this way reduces the amount of executed database significantly.
b) By using this option, all Clean-URLs will be generated directly in module or plugins.
This means, all areas in modules/plugins, who generate internal URLs to categories/articles, have to be adapted manually.
All Clean-URLs have to be generated by using following function:
# structure of a normal url
$url = 'front_content.php?idart=123&lang=2&client=1';
# creation of a url by using the CONTENIDOs Url-Builder (since 4.8.9),
# wich expects the parameter as a assoziative array
$params = array('idart'=>123, 'lang'=>2, 'client'=>1);
$newUrl = cUri::getInstance()->build($params);
Differences to variant a.):
- The default way to generate URLs to fronend pages
- Each URL in modules/plugins has to be generated by UriBuilder
- Each generated Clean-Url requires a database query
Routing: with this setting you can set specific routing rules.
Example: type one routing definition per line as follows:
# {incoming_url}>>>{new_url}
/incoming_url/name.html>>>new_url/new_name.html
# route a specific incoming url to a new page
/campaign/20_percent_on_everything_except_animal_food.html>>>front_content.php?idcat=23
# route request to wwwroot to a specific page
/>>>front_content.php?idart=16
- The routing does not sends a HTTP header redirection to the destination URL, the redirection will happen internally by
replacing the detected incoming URL against the new destination URL (overwriting of article- categoryid) - Incoming URLs can point to non existing resources (category/article), but the desttination URLs should point
to valid CONTENIDO articles/categories - Destination URLs should point to real URLs to categories/articles,
e. g.front_content.php?idcat=23 or front_content.php?idart=34 - The language id should attached to the URL in multi language sites
e. g. front_content.php?idcat=23&lang=1 - The client id should attached to the URL in multi client sites sharing the same folder
e. g. front_content.php?idcat=23&client=2 - The destination URL should not start with '/' or './' (wrong: /front_content.php, correct: front_content.php)
//END
AMR is high configurable plugin, you can set how your url should looks like through dirrefent settings(see screenshot above).
...