Skip to main content
Autrex
Cart (0 items)
GET/legacy/{site}/{path}

Legacy Store URL Redirect

Resolves an old capitalautoparts.ca URL (BigCommerce-era /wheels, /tires, Shopify /collections and Odoo /shop paths) to its current Autrex page with one permanent redirect. Consumed by the Cloudflare Worker in front of capitalautoparts.ca, which forwards the original path as /legacy/capitalautoparts/{path} (or /legacy/capitalautoparts-erp/{path} for erp.capitalautoparts.ca). The Location is a product page only when a single live product matches size, brand, model and rating; otherwise a brand page, then a size or category page. It never redirects to the homepage. Brand/model collections go directly to an existing indexable wheel model; absent or thin models retain the brand page. The response carries an X-Legacy-Match header (exact, fuzzy-unique, model, brand, category, passthrough). Product paths pass through to the localized PDP, whose separate legacy identity fallback may issue a 308 to its canonical live slug. Not for browsers or crawlers to discover: these URLs are deliberately not in the sitemap.

The same-origin /api/erp relay accepts only storefront allow-listed paths and methods; other routes return 404. Browser-supplied API keys are discarded. Direct public API endpoints remain available at their documented URLs.

seoredirectlegacycapitalautoparts

Use Cases

  • Forward old capitalautoparts.ca product, brand and category URLs to autrex.ca in one hop

Path Parameters

ParameterTypeRequiredDescription
sitestringRequired"capitalautoparts" for capitalautoparts.ca, "capitalautoparts-erp" for erp.capitalautoparts.ca
pathstringRequiredThe original URL path, slashes preserved (max 512 characters)

Request Example

cURL
curl "https://autrex.ca/legacy/capitalautoparts/wheels/art-replica-163-17x7-0-45-5x114-3-gloss-black-machined-face"
JavaScript
fetch("https://autrex.ca/legacy/capitalautoparts/wheels/art-replica-163-17x7-0-45-5x114-3-gloss-black-machined-face")

Response

301Permanent redirect to the Autrex page; see the Location and X-Legacy-Match headers (no body)
{
  "status": 301,
  "headers": {
    "location": "https://autrex.ca/en-ca/products/art-r16317001-163-17x7-5x114-3-et35mm-gloss-black-machined-face-wheel",
    "x-legacy-match": "fuzzy-unique"
  }
}
404Unknown legacy URL shape (plain text body, cached 5 minutes, noindex)
{
  "error": "This legacy URL has no verified Autrex destination."
}
503Catalogue lookup unavailable (no-store, Retry-After 30); callers must retry
{
  "error": "Provide url or page_type"
}

Caching

Max Age
3600s