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.

Modifying MODX Templates and System Settings to Enable Friendly URLs

Modifying the System Settings

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.

  1. Login to the MODX Administrator Dashboard.
  2. Hover the menu bar at the top of the screen where it says SYSTEM. Click on SYSTEM SETTINGS when it appears in the drop-down menu.
  3. In order to view all of the Friendly URL settings in one group, click on the button labeled FILTER BY AREA.  Click on FRIENDLY URLfrom the drop-down menu that appears.
  4. You will then see a summary of all the FRIENDLY URL settings.  The MODX settings for URL can be seen in the screenshot below, but for purposes of making it easier to search, there will be a table listing each entry as well.  Use the screenshot or the table below in order to set the Friendly URL settings in the System Settings.

    System Settings - Friendly URL settings

    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

 

Making the Template Changes

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.

  1. Login to the MODX Administrator Dashboard.View of Templates in Resource Tree
  2. In the Resource Tree at left side of the screen click on the ELEMENTS tab and you will see something similar to the screenshot at right.
  3. You will need to right click on each template and make sure that the following setting is in the template between the <head></head> tags.  It will look like this:

     

    <base href="/help/[[!++site_url]]" />

    When you right click on the template select EDIT TEMPLATE in order to make the change listed above.
  4. When you finish making your template changes, click on SAVE in the top right-hand corner to save the entries.
 

Last Step: Clearing the Cache

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
Non-friendly URL being used for page Friendly URL being used for page (highlighted)
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
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.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Did you find this article helpful?

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.
}