Redirecting many url

I’m changing site structure and I have to change about 40 url.
Can I change every single url in htaccess?
Will this code work properly?

RewriteRule ^old/URL/path$ [R=301,L]

Thanks a lot :slight_smile:

Yes you can use it, put it before all the other code :slight_smile:

Thanks dklynn and ScallioXTX.
It’s WordPress with permalinks turned on. Can I use the second version than? Put it before or after all other code that already is in htaccess?

mod_alias’ Redirect is easier and more lightweight. I’d suggest you use that instead of firing up a regex engine you’re not even using :slight_smile:

Redirect 301 old/URL/path


Yup, that’ll do it (provided the URL/path is identical to the redirection’s path).