Forum Discussion
cjunior
Jun 04, 2020Nacreous
Hi,
Is the /dir1 a fixed name?
If so, you can simply skip that name length:
tcl:[string range [HTTP::uri] 5 end]
Otherwise, you can work with variables or try this single line:
tcl:[URI::path [HTTP::uri] 2][URI::basename [HTTP::uri]][expr { \"[URI::query [HTTP::uri]]\" eq {} ? {} : \"?[URI::query [HTTP::uri]]\" }]
I hope it helps.
Regards