Forum Discussion
my.policy URI rename
we are starting to implement quite a few APM login pages through the F5. the one thing we have noticed is that no matter what the site name is - www.domain.com or www.example.com, when the login page triggers in APM, we always get a 302 to the my.policy page..
is there a way to rename that to login or something?? or does the my.policy always have to be there??
5 Replies
- Kevin_Stewart
Employee
It is by design and no way to change that in the configuration. That said, you could technically rewrite it. This is untested, but should work:
when CLIENT_ACCEPTED { ACCESS::restrict_irule_events disable } when HTTP_REQUEST { if { [HTTP::uri] starts_with "/login" } { HTTP::uri [string map {"/login" "/my.policy"} [HTTP::uri]] } } when HTTP_RESPONSE { if { ( [HTTP::is_redirect] ) and ( [HTTP::header Location] starts_with "/my.policy" ) } { HTTP::header replace Location [string map {"/my.policy" "/login"} [HTTP::header Location]] } } Hi,
You can layer two VS : user -> VS1 (LTM only) -> VS2 (with access profile)
then you just have to set the following irule on VS1 :
when HTTP_REQUEST { if { [HTTP::uri] starts_with "/login" } { HTTP::uri [string map {"/login" "/my.policy"} [HTTP::uri]] } } when HTTP_RESPONSE { if { ( [HTTP::is_redirect] ) and ( [HTTP::header Location] starts_with "/my.policy" ) { HTTP::header replace Location [string map {"/my.policy" "/login"} [HTTP::header Location]] } }tested on 11.5.1 HF4
note : "HTTP::is_redirect" command generate an error starting 11.5.1
- avnishvyas_1974
Nimbostratus
Hi Yann unfortunately I tried your iRule attempt and we still get the redirect to my.policy?
- Yann_Desmarest_
Nacreous
Hi,
You can layer two VS : user -> VS1 (LTM only) -> VS2 (with access profile)
then you just have to set the following irule on VS1 :
when HTTP_REQUEST { if { [HTTP::uri] starts_with "/login" } { HTTP::uri [string map {"/login" "/my.policy"} [HTTP::uri]] } } when HTTP_RESPONSE { if { ( [HTTP::is_redirect] ) and ( [HTTP::header Location] starts_with "/my.policy" ) { HTTP::header replace Location [string map {"/my.policy" "/login"} [HTTP::header Location]] } }tested on 11.5.1 HF4
note : "HTTP::is_redirect" command generate an error starting 11.5.1
- avnishvyas_1974
Nimbostratus
Hi Yann unfortunately I tried your iRule attempt and we still get the redirect to my.policy?
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