Get URL Rewrite
get_url_rewriteSearch URL rewrite records by path pattern to retrieve entity type, ID, store, and redirect type. Debug 404s, duplicate URLs, or redirect loops directly from the Magento database.
Instructions
Searches url_rewrite by request_path or target_path pattern. Returns entity_type, entity_id, store_id, redirect_type. Use to debug 404s, duplicate URLs, or redirect loops.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No | Override the MAGENTO_SQL_PROFILE env var for this call only. Use list_connection_profiles to see available names. | |
| magentoRoot | No | Absolute path to the Magento root (must contain app/etc/env.php). Defaults to MAGENTO_ROOT env var or auto-discovery. | |
| path_pattern | Yes | URL path pattern (SQL LIKE) for request_path or target_path (e.g. 'my-product.html', '%/checkout%'). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| rows | Yes | ||
| sampled | No | ||
| rowCount | Yes | ||
| truncated | No |