Log in
Model

RewriteUrl

Magento\UrlRewrite\Model\StoreSwitcher\RewriteUrl

What it does

This class handles URL rewriting when customers switch between different store views in a multi-store Magento installation.

It finds the equivalent URL in the target store by matching URL rewrites, ensuring customers land on the correct page (like the same product or category) when switching languages or regional stores.

Developers use this through Magento's store switcher mechanism to maintain navigation context across stores.

Public Methods

  • switch()