Is there a secret sauce for telling Coldbox (runni...
# box-products
p
Is there a secret sauce for telling Coldbox (running on Commandbox with URL rewrites enabled) not to try to process the web request
/assets2/img/icons/socrates.png
as a CB request? My browser is just asking for the image part of the CSS layout, but CB is saying “not gonna happen,” thinking that `The event: assets2.img is not a valid registered event.``. Do I need to put some sort of “ignore” folder(s) in the config?
a
Do you have something like this in your rules?
Copy code
<condition type="request-uri" operator="notequal">\.(bmp|gif|jpe?g|png|css|js|txt|xls|ico|swf|woff|ttf|otf)$</condition>
p
Nope. That would seem to be what I need. 👍
👍 1
Confused again. In the existing
urlrewrite.xml
file, there’s these lines
<!-- Do not rewrite paths that point to real files or directories -->
<condition type="request-filename" operator="notdir"/>
<condition type="request-filename" operator="notfile"/>
Which should mean that this “real” file request shouldn’t get processed by Lucee/ColdBox, right?
I’m an idiot. The file itself was missing, which then triggered Tuckey/CommandBox/Lucee/CB to think it was a URL needing to be processed. 😳
🙃 1
b
Yep, any existing files/folders will not be rewritten.
That's a common mistake 🙂