SP_SINGH_279526
Feb 17, 2017Nimbostratus
Simple -iRule with URI not behaving as expected
when HTTP_REQUEST { switch -glob [HTTP::uri] {
"/api*" -
"/API*" {
pool pool-XYZ
}
"/style*" -
"/help*" -
default {
pool pool-AMC
}
}
}
`
I have above iRule on HTTPS VIP . when I used URL to access the VIP output as below
[https://google.com/main_page/API/](https://google.com/main_page/API/)
******This is showing 404 page not found[expected output]
[https://google.com/main_page/API/style](https://google.com/main_page/API/style) This is showing 404 page not found [expected output]
**[https://google.com/main_page/API/Help](https://google.com/main_page/API/Help) - This is showing Help page but our requirement is to show 404 page not found [[Not working as expected]**
Will My Below Modified Rule works Fine to resolve this /help issue???
when HTTP_REQUEST { switch -glob [HTTP::uri] {
"/api*" -
"/API*" {
pool pool-XYZ
}
"/style*" -
"/help*" {
HTTP::respond 404 content "Page_not_Found"
}
default {
pool pool-AMC
}
}
}