Forum Discussion
MikeM_44778
Nimbostratus
Jan 16, 2007Rewrite URL Context
How would I go about rewriting the following URL:
http://www.testsite.com/scripts/org.test.dispatch?app=uservariable
to go to
http://www.testsite.com/webapps/newsite/org.test....
Jan 16, 2007
Another option would be to go with the "string map" command
when HTTP_REQUEST {
HTTP::uri [string map -nocase {"/scripts/" "/webapps/newsite/"} [HTTP::uri]]
}
This will replace (map) all occurrances of "/scripts/" in the HTTP::uri with the string "/webapps/newsite/". If "/scripts" isn't present in the HTTP::uri the string map returns the original string.
-Joe
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