Forum Discussion
doc_hack_12696
Nimbostratus
Oct 21, 2010URI substitution
I am trying to change the URI such that CI in the URI is replaced by the value obtained in the FILTER http header. I need to make it in such a way that the user still sees /csn/CI/value1/generic.html ...
greeblesnort
Nimbostratus
Jan 20, 2012sorry to revive an old thread, but this is very similar to my current issue. I'm trying to rewrite an incoming request thusly:
when HTTP_REQUEST {set OLDPATH [HTTP::path]log local0.info "got request for $OLDPATH"if {[HTTP::path] starts_with "/dealers"} {HTTP::path [string map -nocase "/dealers/ /used_car_classifieds/dealer/" [HTTP::path]]set NEWPATH [HTTP::path]log local0. "$OLDPATH should've been rewritten to $NEWPATH"}} Log output is: Jan 20 15:17:38 local/tmm info tmm[5350]: Rule dvlp_dealer_rewrite : /dealers/IL/Chicago/VOLVO should've been rewritten to /dealers/IL/Chicago/VOLVO
so the rule is firing, but I'm either not doing the string map correctly, or the [HTTP::path] isn't getting updated?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
