Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Cleaned up text a little throughout the doc and fixed sample link in Part 2. URL Syntax

...

On the page request, the farFU table is searched for the url.furl attribute. When it is not found the url.furl attribute is parsed and turned into the following url variables:

...

Verifying that FarCry can recognize if friendly urls are working correctly is easy. Just append the string "/pingFU" to your website (e.g. http://localhost/pingFU or http://localhost/sub-directory/pingFU (if using a sub-directory installation of FarCry)). you You should see the the following message on the screen: "PING FU SUCCESS". You do not need to update your application scope to run this test, however, once it's working for the first time, you'll want to update the application scope so that FarCry can register the new functionality.

...

Before FarCry 5.1 you had to configure friendly urls as a plugin (the configuration area was in the webtop). However, as of FarCry 5.1, those configurations are considered deprecated for more flexible methods. See Customizing #Customizing Friendly URLs per Object Type for more details on how to customize your prefixing.

What Happened to /go/ That Used to Exist Pre-FarCry 5.1?

The mandatory Friendly URL prefixing has been removed in FarCry 5.1 and the config section previously used to configure Friendly URLs has been deprecated. If you'd still like to use a prefix like /go/, see Customizing #Customizing Friendly URLs per Object Type.

Customizing Friendly URLs per Object Type

FarCry 5.1 allows you to create custom Friendly URLs automatically when an item is approved (or when the item is created for the first time for items that don't require approval). It does this by looking for a file called displaySystemFU.cfm under the type's webskin folder which gives it specific instructions. If that file doesn't exist it will use the Display Name in the object's <cfcomponent> tag as a prefix followed by a forward slash and then either the title (if it exists) or label of the content item.

Note

By default the only content types that use displaySystemFU.cfm are dmNavigation and dmHTML.

Setting a Global Prefix. (I Upgraded FarCry and Want My Global /go/ Prefix Back)

...

In the Admin section of the webtop (restricted to sysadmins), there is an option to rebuild the Friendly URLs. This feature is helpful if you have a site/project with existing data but do not yet have Friendly URLs for them (perhaps you just activated Friendly URLs). By activating the rebuild feature, FarCry will generate new Friendly URLs for all content items that are enabled to have Friendly URLs (To learn more about how to activate/disable Friendly URLs, see Activating#Activating/Disabling Friendly URLs on Content Types).

Warning

A bit of warning though: If you run this feature and already have content items with existing Friendly URLs, the current Friendly URL for each existing item will be archived (set to 301 redirect) and the new one will become active. If they both have the same name the new one will append a number (e.g. /news/This-Story1).

Managing Friendly URLs Globally

...

Search engines will/should respect the http status for redirects, so . So when you are archiving an old link, it should be updated in search engines within a short time (especially helpful if you plan to delete the old link sometime in the near future).

...

To activate Friendly URLs for a custom type (or one you've extended from core) simply add the attribute/value bFriendly="true" to the <cfcomponent> tag. To disable it, set it to false. You must update the application scope for the change to take effect (specifically the COAPI portion of the application scope).

...

Sometimes getting Friendly URLs to work the first time might seem frustrating... especially when you are reasonably sure you've configured the web server correctly. The reason could be because FarCry has cached a boolean that says Friendly URLs is not currently active (this is done for performance reasons and is checked only once per application scope refresh).

A simple way to check whether friendly urls is working is to add the following friendly url in your browser's address bar: "pingFU". Example: http://localhost/pingFU or http://localhost/sub-directory/pingFU (if using a sub-directory installation of FarCry). If your web server config is working, the result you should see on the screen is the text "PING FU SUCCESS" (with no other text or HTML on the screen). Once you are able to successfully get that result, try updating the application scope for FarCry (e.g. http://localhost/?updateapp=myKey). During the refresh FarCry will check again against /pingFU to see if it gets the response "PING FU SUCCESS". If it does, it will activate Friendly URLs for you.