Forum Discussion
iRule to remove uri if it starts with a specific path
- Nov 16, 2015
A redirect is good here if you don't want to issue a 403. If you are going to use a redirect I would suggest 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 vs 302 the browser will always hit your VIP to get the redirect.
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/console" } { HTTP::respond 301 noserver Location "https://[HTTP::host]" } }
A redirect is good here if you don't want to issue a 403. If you are going to use a redirect I would suggest 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 vs 302 the browser will always hit your VIP to get the redirect.
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/console" } {
HTTP::respond 301 noserver Location "https://[HTTP::host]"
}
}
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
