Forum Discussion
John_Lennon_457
Nimbostratus
Dec 01, 2010Problem with regexp in HTTP class redirection
I'm following this solution http://support.f5.com/kb/en-us/solutions/public/7000/700/sol7771.html and I created a HTTP Class to redirect like this:
when URL matches:
(?i).*testxyz.*
redirect to:
http://[HTTP::host][string map { testxyz abc/123/mysrv } [HTTP::uri]]
the goal is to redirect http://myhost.com/testxyz/myres to http://myhost.com/abc/123/mysrv/myres
This actually works however I have a little annoyance: if a user types a URI like /testxyz/testxyz/testxyz/ the replace appens for each string.
I can use the slashes around the replace to make sure it's a component of the URI and not partial:
http://[HTTP::host][string map { /testxyz/ /abc/123/mysrv/ } [HTTP::uri]]
but this still doesn't solve my issue.
What would be the right TLC command / syntax to use in this situation?
Thanks in advance for your suggestions.
- hoolio
Cirrostratus
Hi John,
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