
In a recent Business Bloomer Club Slack thread, a WooCommerce user shared a challenge with their product URL structure. The site currently uses URLs in the format website.com/product-name
, but they wanted to revert to WooCommerce’s default URL format: website.com/product/product-name
.
With over 900 products, manually creating redirects would be overwhelming, and they needed a solution that wouldn’t impact performance or SEO. The user also wanted to know if a snippet or .htaccess
method could handle this redirect, while keeping the process efficient and clean.
To make this transition easier, a PHP snippet in WordPress can help handle the redirects automatically, avoiding .htaccess
changes. Here’s how you can set it up so that product pages will redirect to the new URL structure with minimal hassle.