Forum Discussion
Stanislas_Piro2
Mar 28, 2017Cumulonimbus
Hi,
URI "" does not exist, no need to search for it.
the following irule may do the job (not tested) to check if the session is allowed, then get the webtop name from the access session variable, and redirect to the expected URI.
in the redirect, do not use absolute URL but only URI. absolute URL in redirect and response page is the nightmare of reverse proxy administrators because it require rewriting if internal and external protocol and hostname are different.
when HTTP_REQUEST {
if { ( [set MRHSession_cookie [HTTP::cookie value "MRHSession"]] ne "" ) and ( [ACCESS::session exists -state_allow $MRHSession_cookie] ) } then {
log local0. "URI: [HTTP::uri]"
if { [HTTP::uri] equals "/" && ([set webtop [ACCESS::session data get -sid $MRHSession_cookie "session.assigned.webtop"]] ne "")} {
HTTP::redirect "/vdesk/webtop.eui?webtop=${webtop}&webtop_type=webtop_full";
}
}
}