When the rewrite goes into effect, any links that point to the previous URL are redirected to the new address.
A URL rewrite changes the way a URL appears in the browser. A URL redirect, on the other hand, updates the URL that is stored on the server. A URL redirect can be either temporary or permanent. Your store uses URL rewrites and redirects to make it easy for you to change the URL key of a product, category, or page and preserve existing links.
To create a redirect rule, please, do the following:
- Log into your Magento admin panel.
- In the Marketing menu, click URL Rewrites.
- After that click on the Add URL Rewrite button.
- Set the Create URL Rewrite to Custom setting. Fill in the Store, Request Path, and Target Path fields.The Request Path is the original path. The Target Path is the new path corresponding to the new web address. This will serve as the target of the redirect rule.
- In the Redirect Type dropdown list, select either 301 or 302 according to your needs.
- Click on a Save button. If you’ve made all the changes successfully – you’ll see The URL Rewrite has been saved message.