Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Fusebox 5.1 allows you to use SES URLs by allowing you to change ? &amp; to /. You still need to provide your own rewriter. However, if you are able to upgrade to 5.5 it supposedly handles rewriting, too.</p> <p><strong>Example Rewriter</strong></p> <p><a href="http://www.fusebox.org/forums/messageview.cfm?catid=31&amp;threadid=6117&amp;STARTPAGE=2" rel="nofollow noreferrer">http://www.fusebox.org/forums/messageview.cfm?catid=31&amp;threadid=6117&amp;STARTPAGE=2</a></p> <pre><code>&lt;cfscript&gt; // SES converter qrystring = ArrayNew(1); if ( Find("/",cgi.path_info) eq 1 and Find("/#self#",cgi.path_info) eq 0 ) { qrystring = cgi.path_info; } else if ( Len(Replace(cgi.path_info,"#self#/","")) gt 0 ) { qrystring = ListRest(Replace(cgi.path_info,"#self#/","#self#|"),"|"); } else if ( FindNoCase("#self#/",cgi.script_name) gt 0 ) { qrystring = ListRest(Replace(cgi.script_name,"#self#/","#self#|"),"|"); } arQrystring = ListToArray(cgi.path_info,'/'); for ( q = 1 ; q lte ArrayLen(arQrystring) ; q = q + 2 ) { if ( q lte ArrayLen(arQrystring) - 1 and not ( arQrystring[ Q ] is myFusebox.getApplication().fuseactionVariable and arQrystring[ q+1] is self ) ) { attributes['#arQrystring[ Q ]#'] = arQrystring[ q+1]; } } &lt;/cfscript&gt; </code></pre> <p><strong>If you choose to use Coldcourse...</strong></p> <p><a href="http://coldcourse.riaforge.com" rel="nofollow noreferrer">http://coldcourse.riaforge.com</a></p> <p>Below will help you get started. You can ignore server-side rewriting (ISAPI for IIS) if you want /index.cfm/circuit/action/ formatted URLs. But if you want /circuit/action/ or /blah/ you'll need to make it server side.</p> <p><strong>application.cfc</strong></p> <p>Put on onApplicationStart (or onRequestStart for testing) to put in memory.</p> <pre><code>&lt;cfset application.coldcourse = createObject("component","components.util.coldcourse").init("/config/coldcourse.config.cfm")&gt; </code></pre> <p><strong>index.cfm</strong> Place this before the framework loads</p> <pre><code>&lt;cfset application.coldcourse.dispatch(cgi.path_info, cgi.script_name) /&gt; </code></pre> <p><strong>coldcourse.config.cfm</strong> (example config)</p> <pre><code>&lt;cfset setEnabled(true)&gt; &lt;cfset setFrameworkEvent("action")&gt; &lt;cfset setFrameworkSeparator(".")&gt; &lt;cfset setFrameworkActionDefault("")&gt; &lt;cfset setUniqueURLs(true)&gt; &lt;cfset setBaseURL("http://www.mysite.com/index.cfm")&gt; &lt;!--- CUSTOM COURSES GO HERE (they will be checked in order) ---&gt; &lt;!--- for http://www.mysite.com/about/ pages ---&gt; &lt;cfset addCourse("components")&gt; &lt;cfset addCourse(pattern="about",controller="main",action="about")&gt; &lt;cfset addCourse(pattern="contact",controller="main",action="contact")&gt; &lt;cfset addCourse(pattern="help",controller="main",action="help")&gt; &lt;!--- If nothing else matches, fall back to the standard courses (you probably shouldn't edit these) ---&gt; &lt;cfset addCourse(":controller/:action/:id")&gt; &lt;cfset addCourse(":controller/:action")&gt; &lt;cfset addCourse(":controller")&gt; </code></pre> <p><strong>Install ISAPI Rewrite</strong></p> <p>Make sure you are using the correct rewrite regex because version 2.0 is different from 3.0.</p> <p>Example for 2.0 script:</p> <pre><code># Coldcourse URL Rewrite for CF IterationLimit 0 RewriteRule ^(/.+/.+/.*\?.+\..*)$ /index.cfm/$1 RewriteRule ^(/[^.]*)$ /index.cfm/$1 </code></pre> <p><strong>Disable Check if File Exists on web server</strong></p> <p>Do this for IIS if you're getting a 404 error in your web logs.</p> <ol> <li>Open the IIS manager</li> <li>Right click on a site and choose Properties</li> <li>Click the Home Directory tab</li> <li>Click the Configuration button (lower right of dialog)</li> <li>Click the .cfm extension and choose 'Edit'</li> <li>The lower left checkbox: "Check that File Exists"</li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload