Hi,
I've used redirects in the past with no problem but this is the first time I'm trying to use RewriteRule with no success for the past few hours.
I need to rewrite a bunch of URLs that changed in a website built with WordPress.
Basically, products that were formerly inside the 'generators' directory are now in the 'energy' directory. The URLs used to look like this:
h t t p://sitedomain.com/products/generators/55th/
and now:
h t t p://sitedomain.com/products/energy/55th/
This is what my htaccess looks like now:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>
# END WordPress
RewriteEngine On
RewriteBase /
RewriteRule /products/generators(.*)$ h t t p://sitedomain.com/products/energy$1 [R=301,L]
This is not working at all.
Any ideas would be greatly welcome.
Thanks.
Gabe
ps: I changed 'http' for 'h t t p' in the post so that the system doesn't convert them to links automatically.