Forum Discussion
Need assistance creating an iRule to modify a URI
If the following path is detected the F5 should change the URI to append /EXAMPLE to the beginning:
/TestProcess.php
Corrected URI would be: /example/TestProcess.php
Thanks.
4 Replies
- ekaleido
Cirrus
Do you need users to see the /example/ or is that just where you want it to land on the server side?
- Vijay_E
Cirrus
This will change the URI and send it to server:
when HTTP_REQUEST { if { [HTTP::uri] eq "/TestProcess.php" } { HTTP::uri /example[HTTP::uri] } }This will send a redirect to the client asking them to request the resource again:
when HTTP_REQUEST { if { [HTTP::uri] eq "/TestProcess.php" } { HTTP::respond 301 Location "http://[HTTP::host]example[HTTP::uri]" } } - dwhite12_255934
Nimbostratus
This is just for a backwards compatibility issue, so I believe it's not important for the users to see the actual redirected URI, just where they land. Hope that makes sense.
- ekaleido
Cirrus
You should check out ProxyPass. It's an iRule that will handle what you're describing. It essentially shows one URI on the client side and another on the server side. It is well documented as well, so you shouldn't have any trouble standing it up.
https://devcentral.f5.com/codeshare/proxypass-v10-v11
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
