To rewrite SEO URL in Magento, you can follow these steps:
- Log in to the Magento admin panel and navigate to "Stores" > "Configuration" > "Catalog" > "Search Engine Optimization."
- Set "Use Web Server Rewrites" to "Yes."
- Clear the Magento cache.
- Navigate to "Marketing" > "URL Rewrites."
- Click the "Add URL Rewrite" button.
- Select the "Custom" option and fill in the necessary fields such as Request Path, Target Path, Redirect Type, and Store.
- Save the URL rewrite.
By doing this, Magento will use the new SEO-friendly URL that you have created instead of the default URL.