Need help with Irule
Hello,
I am working on VIP (both http & https) where https assigned with 2 Irule, first Irule is attached below which works fine. The problem is when I assign the 2nd Irule (Maintenance window), URL is not working. But both the Irule's works individually without any issue.
When I have both the Irule assigned to the https VIP, below 2 URLs works but client requirement is to make this https://mstrdevl.us.xxxxxxx.com work which seems never work.
https://mstrdevl.us.xxxxxxx.com/MicroStrategy---------------- Works
https://mstrdevl.us.xxxxxxx.com/MicroStrategy/servlet/mstrWeb -------------- Works
Note: http vip got another http to https redirect irule assigned. This is Dev VIP so I can make changes immediately based on suggestion.
Any help would be greatly appreciated.
First Irule:
when HTTP_REQUEST { if { (([IP::addr [IP::client_addr]/8 equals 10.0.0.0]) or ([IP::addr [IP::client_addr] equals x.x.x.x]) or ([IP::addr [IP::client_addr] equals x.x.x.x])) and ([HTTP::uri] starts_with "/manager")}{ return } elseif { not ([HTTP::uri] starts_with "/MicroStrategy") }{ HTTP::redirect "https://mstrdevl.us.xxxxxxx.com/MicroStrategy/servlet/mstrWeb" } }
Second Irule
when HTTP_REQUEST {
Change the following to set schedule
set maintenance_start_time "1317"; set maintenance_end_time "1600"; set maintenance_day "Tuesday";
Get time in seconds, formatted as day of week (%A) hour (%k) minute (%M) Use scan to save output as $cur_day $cur_hour $cur_minute
scan [clock format [clock seconds] -format {%A %k %M}] {%s %s %s} cur_day cur_hour cur_minute set cur_time ${cur_hour}${cur_minute} log local0. "\$cur_day: $cur_day, \$cur_hour: $cur_hour, \$cur_minute: $cur_minute, \$cur_time: $cur_time"
if { ($cur_day eq $maintenance_day) && ($cur_time >= $maintenance_start_time) && ($cur_time <= $maintenance_end_time) } { HTTP::respond 200 content " Site Maintenance
text=800517>
MSTR is temporarily unavailable.
Site will be available again at 2:00am.
We are sorry for any inconvenience. "
} }