---
title: Regular Expression Conditional Login URL
description: If the incoming request URL matches a pattern specified in Regular Expression Conditional Login Pattern, the agent redirects the request to the specified URL.
component: web-agents
version: 2025.11
page_id: web-agents:properties-reference:org.forgerock.agents.config.conditional.login.url
canonical_url: https://docs.pingidentity.com/web-agents/2025.11/properties-reference/org.forgerock.agents.config.conditional.login.url.html
---

# Regular Expression Conditional Login URL

If the incoming request URL matches a pattern specified in [Regular Expression Conditional Login Pattern](org.forgerock.agents.config.conditional.login.pattern.html), the agent redirects the request to the specified URL.

The specific URL can be an AM instance, site, or a different website.

Example:

In the following example, when the request matches the regular expression `.*shop`, the agent redirects it to the `alpha` realm for authentication:

`org.forgerock.agents.config.conditional.login.pattern[0] = .*shop`

`org.forgerock.agents.config.conditional.login.url[0] = https://am.example.com/am/oauth2/realms/root/realms/alpha/authorize`

Default: Empty

|                    |                                                                                   |
| ------------------ | --------------------------------------------------------------------------------- |
| Property name      | `org.forgerock.agents.config.conditional.login.url`   Introduced in Web Agent 4.x |
| Function           | Login redirect                                                                    |
| Type               | String Map                                                                        |
| Bootstrap property | No                                                                                |
| Required property  | No                                                                                |
| Restart required   | No                                                                                |
| AM console         | Tab: `AM Services (From AM 7)`Title: `Regular Expression Conditional Login URL`   |
