♥FWR Media Posted May 8, 2011 Author Share Posted May 8, 2011 (edited) Is there a way to have url with underscores (www.estore.com/my_product-p-57.html) redirected to www.estore.com/my-product-p-57.html My old urls have underscores (_) and I didn't find out how to fix that. So if a visitor comes from one of the old urls, there is a 404 not found page. Thank you for your help. Probably the easiest way is to modify the .htaccess regular expression so that the product name string is captured and therefore redirected with the correct params .. try ,, RewriteRule ^([a-z0-9_/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA] Which replaces: - RewriteRule ^([a-z0-9/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA] Edited May 8, 2011 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.