The second set of requirements for enabling Friendly URLs in MODX involves editing the templates that you use for your MODX website and the System settings. If you have not completed the first part of the requirements for enabling Friendly URLS in MODX, please go to Part I: Setting Up Friendly URLs for MODX- HTACCESS file changes. The changes for both the templates and system settings will require using the MODX Administrator Dashboard interface. The following article will take you through the steps for the modifications required for setting up Friendly URLs in MODX.
The Friendly URL settings (abbreviated as 'FURL' in the System Settings) are numerous, but can vary depending on your installation needs. The following changes are the base changes needed for FURLs to work within your installation.
Name | Key | Value |
---|---|---|
Automatically generate alias | automatic_alias | Yes |
Container Suffix | container_suffix | / |
FURL Lowercase Aliases | friendly_alias_lowercase_only | Yes |
FURL Alias Maximum Length | friendly_alias_max_length | 0 |
FURL Alias Character Restriction Method | friendly_alias_restrict_chars | pattern |
FURL Alias Character Restriction Pattern | friendly_alias_restrict_chars_pattern | /[\0\x0B\t\n\r\f\a&=+%#<>"~:`@\?\[\]\{\}\|\^'\\]/ |
FURL Alias Strip Element Tags | friendly_alias_strip_element_tags | Yes |
FURL Alias Transliteration | friendly_alias_transit | none |
FURL Alias Transliteration Service Class | friendly_alias_translit_class | translit.modTransliterate |
FURL Alias Transliteration Service Class Path | friendly_alias_translit_class_path | {core_path}components/ |
FURL Alias Trim Characters | friendly_alias_trim_chars | /.-_ |
FURL Alias Word Delimiter | friendly_alias_word_delimiter | - |
FURL Alias Word Delimiters | friendly_alias_word_delimiters | -_ |
FURL Lowercase Aliases | friendly_alias_lowercase_only | Yes |
Use Friendly Alias Path | use_alias_path | Yes |
Use Friendly URLs | friendly_urls | Yes |
Use Strict Friendly URLs | friendly_urls_strict | No |
When you work in MODX, one of the core concepts in creating a page or working with a snippet is working with a template. A different template can be applied to every page, or you may have a set number of templates uniformly applied to your entire website. You can access the templates through the Resource Tree in the MODX Administrator.
<base href="/help/[[!++site_url]]" />
When you right click on the template select EDIT TEMPLATE in order to make the change listed above.The final step in getting the Friendly URLs to work in your MODX installation is to clear the MODX Cache. Fortunately, this is a simple setting under the menu bar option SITE. Go to How to Clear Cache in MODX for a quick tutorial for this process.
This completes the process for enabling FRIENDLY URLs for MODX. To summarize the change, here are two screenshots displaying the difference:
Page with non-friendly URL in use | Page with Friendly URL in use |
---|---|
Email: | support@WebHostingHub.com | Ticket: | Submit a Support Ticket |
---|---|---|---|
Call: | 757-416-6627 | Chat: | Click To Chat Now |
We value your feedback!
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
new! - Enter your name and email address above and we will post your feedback in the comments on this page!