Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated troubleshooting guide as well as a few FC6 references

...

Info
titleFriendly URLs were re-factored in FarCry 5.1
  • The documentation found on this page has been tested to work in FarCry 5.1+ and FarCry 6.0.x.
  • If you are using FarCry 5.0.x you should refer to the following document for older Friendly URL information: Friendly URL Configuration

Implementation

We are attempting offer now offering 2 things starting in FarCry 5.1+

  1. Offer a friendly url string (that requires no prefix) that when typed after your domain name will be replaced with the relevent objectid from your application
  2. Provide a URL syntax that allows you define the type, objectid, template view and body view webskins

...

Run the Helicon Manager app and place the following config in the root item called "IIS Web Sites" (which gets saved to your root httpd.conf). Separate each website with its own <VirtualHost> tag. Separate each domain/subdomain for the same site with spaces (using example below)

Note

NOTE: You can use the free version of ISAPI_Rewrite 3 Lite, but it does not support the <VirtualHost> tag and will only acknowledge one website.

...

...

Part 2. URL Syntax (type, objectid, view, bodyView)

...

Note

This section is not required to get friendly urls working, but it does discus optional url variables you can use that can be very useful

As of FarCry 5.1 you can use the following url syntax as a friendly url string and if the specific friendly url string is not found in the database, it is converted to the standard url parameters most often used to access content in the system.

...

As you can see, the friendly url above is identical to typing the following in the browserhttp://localhost/index.cfm?type=dmNews&objectid=C98A815E-20F5-4F4E-9562C8400356C706&view=displayPageStandard&bodyView=displayBody

Of course, you dont don't have to have all those variables. If any are omitted, the defaults are set.

...

FarCry allows you to manage Friendly URLs per content item. This can be easily done by going to the "overview" for the content item and selecting to manage the Active and archived Friendly URLs (an option .

Tip

In FarCry 5.1+ this option is located in the right accordion menu

...

. In FarCry 6.x+ this feature can be located under the overview's SEO tab.

Archiving and 301 Redirects (Archiving Old Friendly URLs without Deleting Them)

...

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).

Friendly URL initialisation not happenning?

It is possible to force the friendly url initialisation. This can be done by adding the following line of code
<cfset application.fc.factory.farfu.turnon() />
to your projects _serverSpecificVarsAfterInit script
/projects/projectName/config/_serverSpecificVarsAfterInit.cfm

Troubleshooting

...

Troubleshooting

Test for Friendly URL activation

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 against /pingFU to see if it gets the response PING FU SUCCESS. If it does, it will activate Friendly URLs for you.

Pingfu Works, But Friendly Urls Don't Activate on Server Restart

If friendly urls are not working on server restart, but /pingFU works successfully, you may be running into this bug (FC-1934). This can happen in FarCry 5.1+ as well as FarCry 6.0+. You can read more about the bug in that link. A quick way to test if you are affected by that issue is to update the application scope (http://localhost/?updateapp=myKey). If friendly urls work after you update the application scope, but fail to activate after a server restart, then you are most likely affected by that issue.

If it turns out you are affected by that issue, one thing you can do is attempt to force friendly url initialization on server restart by doing the following:
_Edit your project's _serverSpecificVarsAfterInit script (example: /projects/projectName/config/_serverSpecificVarsAfterInit.cfm and add the following line of code anywhere in that file:

Code Block

<cfset application.fc.factory.farfu.turnon() />

I Still Can't Get Friendly URLs to Work. Help!

If you've exhausted all options in this document and still can't get friendly urls to work, please seek help in the FarCry developer mailing list. Make sure to specify your system configuration and FarCry version as well as anything else you feel may be pertinent. We have a thriving community of developers like yourself who are always willing to help each other out.