Forum Discussion
ekaleido_26616
Cirrocumulus
HTTP::uri ALWAYS starts with / so your code should read:
if {[string tolower [HTTP::uri]] starts_with "/products/new/"
ekaleido_26616
Sep 07, 2016Cirrocumulus
I was afraid you'd ask. My TCL-fu sucks but this might be one way... 🙂
set firstUri [HTTP::uri]
set newUri [split $firstUri "/"]
foreach field $newUri {
lassign $newUri field1 field2 field3 fieldHOWEVERMANYFIELDSYOUHAVE
}
Then in the redirect instead of /* it would be /$field1/$field2 etc, etc.
Like I said, my TCL-fu stinks, but someone will probably provide a more efficient answer.