Forum Discussion
iRule for URL Redirect
you can try setting up an iRule that looks like this:
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] equals "/intranet" } { HTTP::redirect "; } }
- veatoNov 02, 2016
Nimbostratus
Thanks for the suggestion. I've added the iRule (modifying for the correct URLs of course) but no redirect is taking place. I'm simply presented with the current (old) site.
- Kai_M__48813Nov 02, 2016
Cirrus
maybe you should replace equals with starts_with, in case the uri is changed.
also, are you placing this iRule on the main virtual server, or a redirect one? and if there are multiple iRules on the virtual server, make sure that the order is correct, so that no iRules above this one will do anything with the traffic so it doesnt get any hits.
- veatoNov 02, 2016
Nimbostratus
It's on the main Vs and I'm making this the top rule. The below suggestion using starts_with (as you mention above) could be the trick for me!
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