Currently we're using ColdFusion 2021 and I'm tryi...
# lucee
j
Currently we're using ColdFusion 2021 and I'm trying to spin up our application using Lucee... (November EOL is approaching LOL) App is running on Debian 12 and using FW/1. Note - this is a complicated Docker setup for our development environment, I'm well aware of Commandbox but can't use it in this environment 🙂 I have Lucee 6 installed, CFConfig is working and I can connect to the Lucee admin. Our application does some complicated things while spinning up for authentication, SSO, etc. and within onRequestStart I redirect:
Copy code
if (!application.Initialized) {
  location(url="/admin/main/initialize", addToken=false);
}
Which works fine in ACF, but I'm getting an error in Lucee:
Copy code
Message The requested resource [/admin/index.cfm/main/initialize] is not available
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
We currently have a redirect in .htaccess for FW/1 links which seems to be the culprit but I don't know why:
Copy code
# FrameworkOne rewrites to remove index.cfm
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^.*\.(bmp|css|gif|htc|html?|ico|jpe?g|js|pdf|png|swf|txt|xml)$
RewriteRule ^(.*)$ /admin/index.cfm/$1 [NS]
If I comment out the redirect I get an Apache 404... This seems like I need to tweak something in server or web.xml but I'm not sure what... it's been a long time since I last used Lucee
r
seems like your issue is the htaccess setup that the apache server is reading is your issue. The rewriteRule you have is not really valid since there won't be a proper file at /admin/index.cfm/$1 . I would assume the rewrite either needs to be w/o the index.cfm OR you need to get the query string properly created for FW/1 to see the target.
l
Do you want us to help you get this up and running on BoxLang?
j
BoxLang is next on my list 🙂 but wanted to give Lucee a shot as well. I think either Adobe or Lucee (or FW1) is going something magical under the hood with how it handles the index.cfm.
I added this to web.xml servlet mapping section and I now get a bit further!
Copy code
<url-pattern>/admin/index.cfm/*</url-pattern>
m
for that url-pattern, i think you might need to change the rewrite rule to something more like
RewriteRule ^/admin(/.*)?$ /admin/index.cfm$1 [NS]