isredirect Element

Redirect the browser to a specified URL.


  location  = target_url        \\required
  permanent = "true" | "false"  \\false is default
location = target_url

Allowed data type: string or expression.

target_url specifies a target URL used by the browser to send a new request.

permanent = "true" | "false"
false is the default

Allowed data type: string or expression.

  • true causes the system to generate an HTTP 301 response code.
  • false causes system to generate an HTTP 302 response code.
Note: If the permanent attribute isn't provided, false is the default .


Note: <isredirect> appears before <iscache> in templates, because it clears the response created up to that point.


The following example checks whether the buyer has enabled cookies in their browser or not. Depending on the result, the browser is redirected.

<isif condition = "${request.httpCookies['UserID']}">
    <isredirect location="${URLUtils.url('LoginPanel-Start')}" permanent="false">
<!--- cookies are not enabled --->

Some browsers don't support redirect from HTTP to HTTPS. In such a case use the HTML meta tag "refresh", for example:

<meta http-equiv="refresh" content="0; URL='${URLUtils.url(...)}'">
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.