Hello,
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$ http://example.com/new/path [R=301,L]
Hello,
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$ http://example.com/new/path [R=301,L]
Thanks a lot
Yes you can use it, put it before all the other code
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
Redirect 301 old/URL/path http://example.com/new/path
snecz,
Yup, that’ll do it (provided the URL/path is identical to the redirection’s path).
Regards,
DK