<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content

Redirect Users to a Specific URL Based on the HTTP Status Code in Okta Access Gateway

Access Gateway
Okta Classic Engine
Okta Identity Engine

Overview

Administrators can redirect users to a specific error page based on the HTTP status returned from the Okta Access Gateway (OAG) application. Set a directive to intercept the errors through a policy that redirects users to the required URL.

Applies To

  • Okta Identity Engine (OIE)
  • Okta Classic Engine
  • Okta Access Gateway (OAG)

Solution

How is a user redirected to a specific URL based on the HTTP status code?

Configure the application policy with an advanced directive to intercept errors and redirect users to a specific URL based on the HTTP status code.

  1. Edit the application and navigate to the policy section.
  2. Edit the root policy and select the Advanced tab.
  3. Add the following directive in the advanced section:
proxy_intercept_errors on;
error_page 404 502 503 504 https://okta.com;

NOTE: This policy redirects users to https://okta.com whenever the backend application receives an HTTP 404, 502, 503, or 504 error, or when the application is unresponsive.
4. Select Not Validated to validate the setting and save the application.

Recommended content

Loading
Redirect Users to a Specific URL Based on the HTTP Status Code in Okta Access Gateway | Okta Support