Forum Discussion
mj16othman
Altostratus
Dec 12, 2022Hiding URL
Guys i need help I have users when they type in lets say https://oli.test.com the client browser displays https://oli.test.com/mortgage/default.aspx?clientid=1021. I basically want to hi...
Dec 12, 2022
Hi mj16othman ,
> Try this :
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/mortgage" } {
HTTP::redirect "https://[HTTP::host]"
}
}
> Or try this :
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/mortgage" } {
HTTP::respond 301 noserver Location "https://[HTTP::host]"
}
}Note : I would suggest the second iRule due to a 301 to minimize on repeat traffic from users. 301 is a permanent redirect and the browser will do an internal redirect next time the browser visits.
Try it and give me the feedback.
Regards
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
