You are here:  » Rewrite URL for new product path

Rewrite URL for new product path

Submitted by twdesigns on Sat, 2014-06-14 15:42 in

I recently changed /product/ to /book/ and was wondering what I would use to issue a 301 move for all my indexed pages in google. I tried:

RewriteRule ^product/(.*)$ /book/$1 [R=301,NC,L]
and I also tried one that was recommended on with no luck.

What should I use?

Submitted by support on Mon, 2014-06-16 09:01


I would have a go with:

  RewriteRule ^product/(.*)$ book/$1 [R=301,NC,L]

(no leading "/" on the new URL) but also make sure that it occurs in .htaccess _before_ the Wordpress rules otherwise it won't have a chance to take effect - insert it just after the RewriteBase line should do the trick...