Forum Discussion
iRule subdirectory to hostname with URI
I am using subdirectories,
I would like to go from:
subdirectory "/catpics" to redirect to "; which is easy, but I want anything following /catpics to go as well.
ex: http(s)://myhost.com/catpics/baddog to go to ";
or http(s)://myhost.com/catpics/baddog/puppies to go to ";
I do not want it to go to "; - that would be easy
How do I eliminate the "catpics" from [HTTP::uri]
Thanks!
1 Reply
- nathe
Cirrocumulus
You could use "string range". please see iRules 101 - 14 - TCL String Commands Part 2 for an explanation.
As catpics is a fixed length then something like
might work.set newuri [string range $uri 8 end]Hope this helps,
N
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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