Forum Moderators: phranque
It seems that on setup Cold fusion adds a handler for a few filetypes, .cfm among them.
Say I have a page <some_url>/b.cfm that returns some dynamic content.
Then say I want all .html pages to actually go to b.cfm
So <some_url>/a.html should actually return <some_url>/b.cfm.
So I add the following to the virtual host
RewriteEngine on
RewriteRule ^.+\.html /b.cfm [NC]
The server redirects just fine. The problem is that b.cfm is just returned without being processed by Cold Fusion so say instead of getting the current date I get #now()#.
How do I get the dynamic content?
Is it possible to do what I'm trying to do and if so how?
RewriteEngine on
RewriteRule ^.+\.html /b.cfm [NC,PT,L]
That said, I'd probably tweak it this way:
RewriteEngine on
RewriteRule \.html$ /b.cfm [NC,PT,L]
Finally, note that the use of the 'PT' flag may well have unexpected consequences; test thoroughly. =)
(if 'PT' doesn't work, or breaks stuff, I'd still use my latter Rule with it removed, BTW)