# urlMatches

**Kind:** Function

**Source:** [`atloria-monorepo/apps/api/src/tours/tour-targeting.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/api/src/tours/tour-targeting.ts#L88)

Does `url` satisfy the rule list? No rules (absent or empty) → match ALL
pages. Rules are OR-ed. Rule values starting with '/' are path rules
(compared against pathname+search); anything else is compared against the
full normalized URL. An invalid regex never matches (and never throws).

## Signature

```ts
function urlMatches(rules: UrlRule[] | undefined | null, url: string): boolean
```

## Parameters

| Name | Type |
|---|---|
| `rules` | `UrlRule[] | undefined | null` |
| `url` | `string` |

**Returns:** `boolean`
