# Match a path against redirects

**Publié le** : 2026-05-12
**Catégorie** : Storefront API

## `GET /redirects/match`

**Match a path against redirects**

Look up the redirect rule that matches a given source `path` query
parameter. Returns the rule (source, target, status code,
preserveQueryString) or 404 if no rule applies. Used by edge
renderers to honor admin-defined redirects without hardcoding them.

### Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |


> **Notes:** Cache: not cached (per-path lookup). Rate-limit bucket: general.
> `path` is required; missing or empty returns a 400 with an error
> envelope.

### Examples

```curl
curl "https://api.lynkow.com/public/{siteId}/redirects/match?path=/old-pricing"
```

```javascript
const res = await fetch(`https://api.lynkow.com/public/${siteId}/redirects/match?path=/old-pricing`)
if (res.status === 404) return null
const { data } = await res.json()
```

### Response Example

```json
"{\n  \"data\": {\n    \"source\": \"/old-pricing\",\n    \"target\": \"https://acme.io/pricing\",\n    \"statusCode\": 301,\n    \"preserveQueryString\": true\n  }\n}\n"
```

---