Proper Fusebox SES URLS

Standard Fusebox SES (Search Engine Safe) URLS will match the standard Fusebox URLS that you are used to with the exception of all '&' '=' '?' are replaced with '/'. Fusebox will correctly parse all name/value pair variables within your URL strings. This means all links or other url changing means will need to have all '&' and '=' replaced with '/'.

EXAMPLE:

STANDARD:
http://mysite.com/index.cfm?do=display.catalog&catalogId=219

FUSEBOX SES:
http://mysite.com/index.cfm/do/display.catalog/catalogId/219

The SES URL, when read, will then appear to be that of a directory hierarchy.

In the above SES scenario, Fusebox WILL allow you to append additional variables as standard traditional ColdFusion URL Variables. Since when read an appended variable is the first, you will need to begin these with a '?'.

EXAMPLE:

FUSEBOX SES:
http://mysite.com/index.cfm/do/display.catalog/catalogId/219

ADDITIONAL VARIABLE:
http://mysite.com/index.cfm/edge/display.catalog/catalogId/219?myVar=This&myOtherVar=That

ColdFusion Server Configuration

Depending on your server environment you may see differences in the way in which your URL's are handled server side. Please be sure you are running the most current ColdFusion updaters.

In IIS, be sure the 'Check that file exists' option on your Application Extension Mapping is NOT Checked as follows:

The above is accessed as follows:

In your IIS admin, go to Home Directory, Configuration and edit the extension you wish SES to work with (.cfm in our case). At the bottom of the edit screen is a checkbox that says "check that file exists". Make sure this is in the off position.

Other issues explained

  • Why are you using a colon (:) to seperate between variables and values? Other systems use slashes (/) to seperate everything.
There are two reasons to use a colon (:). The first is style. There should be a clear seperation between variables and values. This is both for debugging purposes and to keep a clean style. The second reason is a more rational one. My system allows for a variable with a NULL value. Using slashes only does not.

  • When using SES URLs, my relative paths are messed up. How do I fix this?
Because we're hiding the variables behind slashes, any relative line will be looking to start from a directory that basically does not exist. For this reason, when using SES URLs, you have to make all references to web content absolute. This means that ../images/logo.gif has to be /images/logo/gif. An annoyance, but a price most are willing to pay for the results.

  • Passing dates in a mm/dd/yy format blows up. Is there a fix?
Because we're using a slash (/) as a delimiter, a date passed in that format is seen as just more variable/value pairs (and unbalanced at that). To fix this, you have to translate the date you're sending on the URL into something else. Dashes (-) are a good alternative. Remember not to use colons (:) as they're used by the code for variable/value separators.

Additional Information

Comments

There are currently no comments on this fusearticle.
Be the first to comment