Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I need this URL:

http://mysite.com/products/amazingproduct1/

To redirect to this URL:

http://mysite.com/amazingproduct1/

This is a global issue for all new /products posted, and I think it can be done with htaccess, I just haven't been able to hack it together properly.

Thanks for any help

share|improve this question

closed as off topic by toscho Jan 12 at 3:27

Questions on WordPress Answers are expected to relate to WordPress within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

2 Answers

You can add the following to your .htaccess file, before the default WordPress rules:

Redirect 301 /products http://mysite.com
share|improve this answer
RewriteRule ^(.*) /products/$1 [QSA,L]
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.