Skip to content

URL Rewrites

A URL rewrite sends a shopper who requests one path to a different target path — a manual redirect you control. It mirrors the admin Marketing → Search & SEO → URL Rewrites screen.

How a URL rewrite works

A rewrite maps a source path to a target path for a given storefront entity and locale.

  • What it points atentityType ties the rewrite to a product, category, or cms_page. requestPath is the path a shopper requests; targetPath is where they end up.
  • How it redirectsredirectType is either 301 (permanent) or 302 (temporary). A 301 tells search engines the move is permanent and transfers ranking; a 302 signals a temporary detour.
  • Where it applieslocale scopes the rewrite to a single storefront locale.

Why it matters. When a slug changes — a renamed product, a moved category, an updated CMS page — old bookmarks and search-engine links would otherwise break. A rewrite keeps those links alive by forwarding them to the new path.

Relation to other menus. Bagisto also creates rewrites automatically when a slug changes. The entries here are the ones you add or adjust by hand, complementing those automatic rewrites.

Operations in this menu

ActionEndpoint
ListGET /api/admin/marketing/url-rewrites
DetailGET /api/admin/marketing/url-rewrites/{id}
CreatePOST /api/admin/marketing/url-rewrites
UpdatePUT /api/admin/marketing/url-rewrites/{id}
DeleteDELETE /api/admin/marketing/url-rewrites/{id}
Mass DeletePOST /api/admin/marketing/url-rewrites/mass-delete

All URL Rewrites endpoints require an admin Bearer token — see Authentication.

Released under the MIT License.