I have files in a subdir under an application.cfc.

I'd like to automatically append a specific myvar=somevalue to every hyperlink 
on these pages. Is there a way I can use onRequest and regular expressions to 
re-write paths before they're output back to the browser?

For instance, in a template I have:

<a href="myfile.cfm">click here</a>

but after parsing through onRequest (or something similar) it would look like:

<a href="myfile.cfm?myvar=somevalue">click here</a>

And I wouldn't have to remember to code that into every hyperlink on every page 
myself.

The parser/re-writer should add the ? if it's not there and keep it if it is, 
ignore other params if they exist, add an & if needed, etc. Anyone know of such 
thing out there?

In case you're wondering why, I'm following Philip Chalmers suggestion 
(http://coldfusion.sys-con.com/node/41749) about adding random numbers to url 
params and form actions so proxy servers never cache dynamic pages.

Thanks! 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312132
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to