Friendly URLs in the past had a number of limitations not the least of which was the requirement of the "/go/" prefix and the inability to easily add url attributes in addition to the friendly url string. |
If you are using FarCry 5.0.x you should refer to the following document for Friendly URL information: Friendly URL Configuration |
We are attempting offer 2 things in FarCry 5.1
This is done by including the following in your apache virtual or conf (Apache Only):
##### APACHE VERSION RewriteEngine On RewriteCond %{REQUEST_URI} !(/farcry|/webtop|/flex2gateway|/flashservices)($|/) RewriteRule ^([a-zA-Z0-9\/\-\%:\[\]\{\}\|\;\<\>\?\,\*\!\@\#\$\ \(\)\^_`~]*)$ /index.cfm?furl=$1 [L,PT,QSA] |
For IIS you will need to install an ISAPI Rewrite dll and use the following redirect
##### IIS VERSION RewriteCond %{QUERY_STRING} ^(.*)$ RewriteCond %{REQUEST_URI} !(/farcry|/webtop|/flex2gateway|/flashservices)($|/) RewriteRule ^(.*)$ /index.cfm?furl=$1&%1 |
This essentially redirects to the index.cfm any url without a "." in it (ie, index.cfm, main.css, fotm.js) and not under the folders specified in the exception (/farcry, /webtop, /flex2gateway, /flashservices). |
For Example
Browser Address |
Server Address |
---|---|
Not Redirected |
|
http::/localhost/index.cfm?furl=/my-cool-page |
|
http://localhost/my-cool-page/and-its-cool-subpage | http://localhost/index.cfm?furl=/my-cool-page/and-its-cool-subpage |
http://localhost/another-fu?page=5 |
On the page request, the farFU table is searched for the url.furl attribute. If it is found, then the url.objectid is populated with the relevent objectid just like prior to 5.1
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.
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:
As you can see, the friendly url above is identical to typing the following in the browser http://localhost/index.cfm?type=dmNews&objectid=C98A815E-20F5-4F4E-9562C8400356C706&view=displayPageStandard&bodyView=displayBody
Of course, you dont have to have all those variables. If any are omitted, the defaults are set.
If you only pass 1 webskin name, then it is placed in the url.view attribute and the url.bodyView will be set to the default (displayBody)