Forum Discussion
javier_diaz_379
Nimbostratus
Sep 16, 2011how to lower a part of the URI?
Lets say I have www.foo.com/Bar/Xxxxx
I need an irule to only lower the firs part of the URI. In the case I need a 301 redirect to www.foo.com/bar/Xxxxx
How can I do that?
richard_77048
Nimbostratus
Sep 16, 2011If you know what the first part of the URI is, then it isn't so bad. You can grab everything after that first part of the URI with this:
set newURI [string range [HTTP::uri] 4 end] this trims off /Bar (4 characters, you can change that value to reflect your actual URI)
Now, you can redirect to www.foo.com/bar$newURI.
If the first part of the URI isn't always known, it's still possible but more work.
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