Forum Discussion
policy and irule multiple redirect not allowed
Hi - i have a Question -
i have a policy that does a redirect - meaning if URI path is / redirect to /abc
for maintenance window i have a i rule that detects time and should redirect to a maintenance page
but the rule gives "Multiple redirect/respond invocations not allowed" -- how can i resolve this - meaning execute this irule
set static::start_date "2019-05-05 10:09"
set static::end_date "2019-05-05 10:10"
set static::start [clock scan $static::start_date]
set static::end [clock scan $static::end_date]
}
when HTTP_REQUEST timing on {
set now [clock seconds]
if { not [class match [IP::client_addr] equals private_net] } {
if {$now > $static::start and $now < $static::end}{
HTTP::redirect "http://mytedirect-maintenance"
Hi mawan_revera
You can add /abc redirect to iRule.
if {$now > $static::start and $now < $static::end} { if { not [class match [IP::client_addr] equals private_net] } { HTTP::redirect "http://mytedirect-maintenance" } } else { if { [HTTP::uri] equals "/" } { HTTP::redirect "http://[HTTP::host]/abc" } }
- mawan_revera
Altostratus
hi -
Thanks for the response -
that would mean - i would have to remove the policy
meaning
the policy gets executed - and when it gets to the irule - i get an error and nothing happens
adding the redirect to the irule would not help with that
i want to keep the policy and find a way to have a maintenance window redirect
- mawan_revera
Altostratus
i figured it out -- did if statement before the - maintenance page to do a redirect to /abc and then - redirect to maintenance page
- thanks for helping
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