atuttle / Taffy

:candy: The REST Web Service framework for ColdFusion and Lucee
http://taffy.io
Other
226 stars 117 forks source link

URL Rewrite with Vanilla Tomcat/Lucee #411

Closed kjones09 closed 3 years ago

kjones09 commented 3 years ago

I'm running into issues with URL rewriting and Taffy.

I'm using Tomcat 9 with Lucee (Coldbox/Lucee Express with Tomcat are not options).

Added to web.xml:

CFMLServlet /api/index.cfm/*

Added to rewrite.config: RewriteCond %{REQUEST_FILENAME} /api/ RewriteCond %{REQUEST_FILENAME} !/api/index.cfm RewriteCond %{REQUEST_FILENAME} !/api/resources RewriteRule ^/api/(.*) /api/index.cfm?endpoint=/$1 [NS,L]

Added to context.xml <?xml version="1.0" encoding="utf-8"?>

Dashboard works fine @ localhost:8080/api/ and testing the resources all work fine in the dashboard. localhost:8080/api/index.cfm?endpoint=/hello works fine. localhost:8080/api/hello/ takes me back to the dashboard. What am I missing in the rewrite to get to work? We are moving from Coldfusion on IIS to Lucee in Azuze and cannot have client change their url's to include index.cfm.

Any help is greatly appreciated