Extensions > urlcleaner
| [urlcleaner] Remove unwanted elements from the URL | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
Removes unwanted parts of the url like "items" or "events"What it doesAll reader modules in Contao (like the news or event reader) get the alias or id of the entry to display as part of the URL. Before that a common part is added to the URL like "/items/" or "/events/". From a users option of view and for SEO this part is unwanted. The extension urlcleaner offers a way to clean the URL from such fragments. The URL parsing happens in two ways: When a link is generated to such a reader URL, the unwanted part gets removed from the URL. When such a URL is called, the technically missing part is added unseen for the user and search engines in the background. UsageAfter installation of the module you have to modify the localconfig.php for each URL you want to get changed. Important: Do NOT add a slash at the end of your entries! Important: Add this code after(!) ### INSTALL SCRIPT STOP ###! $GLOBALS['TL_CONFIG']['arrUrlFragments'] = array( This example will rewrite URLs from /news-reader/items/alias to /news-reader/alias. If you want to rewrite multiple URLs, add one line for each in that array. Example: $GLOBALS['TL_CONFIG']['arrUrlFragments'] = array( You can rewrite for more that one level. Let's assume you have a blog entry reader at /weblog/reader/ and the items URLs would be /weblog/reader/items/alias. You can change that to /weblog/alias by the following configuration: $GLOBALS['TL_CONFIG']['arrUrlFragments'] = array( ImportantWhile expanding URLs the extension checks if there is a page with that alias before expanding it. If this is the case, the additional part won't be added to the URL. With the last example above: Each link to /blog/reader/items/foobar will be replaced by /blog/foobar. But when calling /blog/foobar it won't get expanded to /blog/reader/items/foobar because a page with that alias exists. You have to make sure that the aliases you use don't match the aliases of other existing pages. Avoid duplicate contentWhen you are using urlcleaner all internal links within Contao are replace to new ones. But the old URLs still remain valid, that means you can call them to get identical content like from the new URLs. This is called duplicate content and is bad for ranking in search engines result pages. To avoid duplicate content you need to redirect all old URLs to the new ones by an entry in the .htaccess files. Here are some sample rules: If all occurrences of URLs with the parameter "items" are redirected using urlcleaner, you can put this into one single rewrite rule: SponsorThe development of this extenion was payed by: http://kurvenkoenig.de | ||||||||||||
| Version | 1.0.0 stable | Type | Free | |||||||||
| Release date | 2010-01-19 | Category | Other | |||||||||
| License | LGPL | |||||||||||
| Copyright | © 2011 Jan Theofel, 2010-2011 ETES GmbH | |||||||||||
| Author | Jan Theofel (jan.theofel) http://www.theofel.de/ | |||||||||||
| Release notes and change log for 1.0.0 stable | Other versions | |||||||||||
- Bugfix for ticket #1000: No error message if no configuration is given | 1.0.0 beta1 1.0.0 beta2 1.0.0 beta3 | |||||||||||
| Release functionality | Total functionality | |||||||||||
| Release usability | Total usability | |||||||||||
| Release quality | Total quality | |||||||||||
| Release rating | Total rating | |||||||||||
| Release downloads | 109 | Total downloads | 124 | |||||||||
| Release installs | 696 | Total installs | 754 | |||||||||
| Release updates | 64 | Total updates | 67 | |||||||||
| Dependencies of this extension | Other extensions depending on this one | |||||||||||
|
| |||||||||||
| Package | Size | Date |
|---|---|---|
| Contao_urlcleaner_10000009_15.zip | 7444 | 2012-01-15 22:04 |
