301 redirect a category and all its subcategories

I recently changed the name of a category from car-clubs to clubs-forums. I am trying to setup a 301 redirect but can't seem to get it to work. There are multiple sub-categories in this category as well. I've tried to add the following to my .htaccess file


[quote]RewriteRule ^car-clubs/(.*) [url=“http://www.url.com/clubs-forums/$1”]http://www.url.com/clubs-forums/$1[/url] [R=301,L][/quote]



and


[quote]RewriteRule ^car-clubs/?(.*)$ clubs-forums/$1 [R=301,L][/quote]



I've tried having both in .htaccess and either one or the other, but see no changes. Can anyone provide any insight?



Thanks

[quote name='idslamyou' timestamp='1336708684' post='136220']

I recently changed the name of a category from car-clubs to clubs-forums. I am trying to setup a 301 redirect but can't seem to get it to work. There are multiple sub-categories in this category as well. I've tried to add the following to my .htaccess file







and







I've tried having both in .htaccess and either one or the other, but see no changes. Can anyone provide any insight?



Thanks

[/quote]


```php DirectoryIndex index.html index.php





RewriteEngine on

Some hostings require RewriteBase to be uncommented

Example:

Your store url is http://www.yourcompany.com/store/cart

So “RewriteBase” should be:

RewriteBase /store/cart

RewriteBase /

RewriteRule ^car-clubs/(.*) http://www.url.com/clubs-forums/$1 [R=301,L] ```



Note that 'RewriteBase' appears directly before the rewrites, otherwise it will not work.



J.

I could never get any RewriteRule rules to work with CS-Cart, instead I use the following which does the job:


RedirectMatch 301 ^/old-category/(.*)$ http://www.domain.com/new-category/$1