I am trying to write a path-based router in ColdFu...
# lucee
e
I am trying to write a path-based router in ColdFusion and using
lucee
with
tomcat
. Using
url-rewrite
I am able to achieve path-based routing. The rewrite rules are,
Copy code
# RewriteEngine on
#if this call related to adminstrators or non rewrite folders, you can add more here.
RewriteCond %{REQUEST_URI} ^/(.*(CFIDE|cfide|CFFormGateway|jrunscripts|railo-context|lucee|mapping-tag|fckeditor|rest)).*$
RewriteRule ^(.*)$ - [NC,L]

#Images, css, javascript and docs, add your own extensions if needed.
RewriteCond %{REQUEST_URI} \.(bmp|gif|jpe?g|png|css|js|txt|xls|ico|swf)$
RewriteRule ^(.*)$ - [NC,L]

#The ColdBox index.cfm/{path_info} rules.
RewriteRule ^$ index.cfm [QSA,NS]
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.cfm/%{REQUEST_URI} [QSA,L,NS]
The problem is though routing is working fine but the
href
or
src
attributes are not working. And I am clueless what should be done, please help. For more information please follow these: • https://github.com/aba-wtag/Custom_Lucee • https://github.com/aba-wtag/cf-routing
w
Copy code
but the href or src attributes are not working
what does this mean? what is the response you get when hitting an image url in the browser directly?
e
I guess his code doesn't change the source or href attributes. Which is by design.