Note that there are some explanatory texts on larger screens.

plurals
  1. PORunning a CFWheels site from a subfolder instead of the web root
    primarykey
    data
    text
    <p>My CFWheels site is running under subfolder/ in the web root, and I have the web.config on the same level as subfolder/. In my web.config I have the necessary URL rewrite rule to remove "subfolder/index.cfm/" from the URL.</p> <p>My problem arises when I try to include a Javascript file from the default "javascripts" folder using</p> <pre><code>javaScriptIncludeTag("script.js") </code></pre> <p>By default, cfwheels looks in /subfolder/javascripts/ for the JS file. However, I've removed subfolder/ from the URL, so a request to /subfolder/javascripts/script.js fails with the following error message:</p> <blockquote> <p>Wheels.ViewNotFound</p> <p>Could not find the view page for the javascripts action in the subfolder controller.</p> </blockquote> <p>Bogus. "javascripts" and "subfolder" are not an action and a controller.</p> <p>I believe a request to /javscripts/script.js would succeed. How do I tell cfwheels not to look for the javascripts/ folder in subfolder/?</p> <p>I was unable to find the answer in the documentation, and I haven't gotten any response on the CFWheels Google Group either. I'm looking for an answer <a href="https://stackoverflow.com/questions/4646000/zend-framework-in-a-subfolder-but-images-taken-from-site-root/4646357#4646357">such as this</a>, but specific to CFWheels.</p> <p><strong>edit</strong><br> IIS 7 web.config rewrite:</p> <pre><code>&lt;rule name="Remove subfolder/index.cfm"&gt; &lt;match url="(.*)" /&gt; &lt;action type="Rewrite" url="/subfolder/index.cfm/{R:0}" /&gt; &lt;/rule&gt; </code></pre> <p>My problem may be here if this rule is incorrect, I'm not sure.</p> <p>linkTo() actually links to the incorrect path as well.</p> <pre><code>linkTo(text="Say Hello", controller="say", action="hello") </code></pre> <p>outputs</p> <pre><code>&lt;a href="http://mysite.com/subfolder/index.cfm/say/hello"&gt;Say Hello&lt;/a&gt; </code></pre>
    singulars
    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.
 

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