How to write an AppExpert Rewrite policy for EULA/Header on AAA/GW vserver
book
Article ID: CTX575004
calendar_today
Updated On:
Description
Demonstrate how a rewrite action can be used to add a footnote or a header above the logon page of a AAA vserver.
Instructions
First you will need to create a rewrite action (In this example, only Lorem Ipsum text was inserted as a filler):
- add rewrite action rw_act_lorem_ipsum insert_after_all "HTTP.RES.BODY(300000).SET_TEXT_MODE(IGNORECASE)" "\"<div id=customHelp><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p></div>\"" -search q{text("<p class=\"back-to-choices\"><a href=\"#\" class=\"authentication-link _ctxstxt_UseAnotherLogonOption\"></a></p>")}
Then you can create the rewrite policy that will call for that action:
- add rewrite policy rw_pol_lorem_ipsum "HTTP.REQ.URL.CONTAINS(\"/tmindex.html\") || HTTP.REQ.URL.CONTAINS(\"/index.html\")" rw_act_lorem_ipsum
You will then need to bind that policy to your AAA vserver:
- bind authentication vserver <vserver name> -policy <policy name> -priority 100 -gotoExpression END -type RESPONSE
To set it as a Header:
- add rewrite action rw_act_custom_logon_text_customAuthTop insert_after_all "HTTP.RES.BODY(300000).SET_TEXT_MODE(IGNORECASE)" "\"<div id=customHelp><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p></div>\"" -search q/text("customAuthTop\">")/
Then you will create the rewrite policy that will call for that action:
- add rewrite policy rw_pol_custom_logon_text "HTTP.REQ.URL.CONTAINS(\"/tmindex.html\") || HTTP.REQ.URL.CONTAINS(\"/index.html\")" rw_act_custom_logon_text_customAuthTop
Issue/Introduction
How to write an AppExpert Rewrite policy for EULA/Header on AAA/GW vserver
Was this article helpful?
thumb_up
Yes
thumb_down
No