Forum Discussion
nkroon1
Cirrus
Aug 16, 2019iRule Help - Change URL URI
Hello. I've been having issues with this all morning. I've tried a few different variations but none seem to work. I'm attempting to change the uri of a URL. For example, example.com/na...
Aug 21, 2019
Hi nkroon,
Can you try these iRules?
Modify uri without redirect:
when HTTP_REQUEST {
if { ( [string tolower [HTTP::host]] equals "example.com") or ( [string tolower [HTTP::host]] equals "www.example.com") } {
if { [string tolower [HTTP::uri]] equals "/nav" } {
HTTP::uri "/help"
}
}
}Redirect
when HTTP_REQUEST {
if { ( [string tolower [HTTP::host]] equals "example.com") or ( [string tolower [HTTP::host]] equals "www.example.com") } {
if { [string tolower [HTTP::uri]] equals "/nav" } {
HTTP::redirect "http://www.example.com/help"
}
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
