Redirect Issues

So I currently have my categories like:



http://www.domain.com/anaconda-batteries/ and I want to change them to http://www.domain.com/lead-acid-batteries/anaconda-batteries.html



Obviously easily done with the SEO addon, but I can't get the darn redirects to work right. Right now I'm trying:


RedirectPermanent /anaconda-batteries /lead-acid-batteries/anaconda-batteries.html



But it isn't working. For now I've switched the SEO back, but I'd love to get this figured out. Any ideas?



Thanks,



Brandon

I was looking this up last week but havent tried it yet in the .htaccess


RewriteRule (.+)/$ /$1.html [L,R=301]



R=301 makes it permanent just R would make it temporary

John


RewriteCond %{REQUEST_URI} /anaconda-batteries/
RewriteRule ^.*$ http://www.domain.com/lead-acid-batteries/anaconda-batteries.html [L,R=301]




should work

Floris,



Man, I was really hoping that you had it there, but unfortunately it didn't work. Any ideas?



Thanks,



Brandon

Make sure you place the code directly after 'RewriteBase /' otherwise the redirects won't take place.

Argh, that's freaking annoying. I swear I tried it there and it didn't work. Now I try it again and it works great. Obviously I had something screwed up before.



Thanks you guys, I really appreciate it.



Brandon

Glad it worked Brandon!

To reiterate what JLS has posted, the rewrite rules need to be within the IfModule tags.


```php

Rewrite rules


```