0

I'm trying to redirect all pages of example.com to a specific page domain.com/rebrand-explained

except for the following pages, they need to be going to the same slug on the new domain for example:

example.com/secure-payment to domain.com/secure-payment

example.com/blog/news/please-help to domain.com/blog/news/please-help

1 Answer 1

1

Got it working using the following

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(?:www\.)?example\.com$ [NC]

RewriteRule ^secure-payment$ https://domain.com/secure-payment [L,NC,R=301]

RewriteRule ^blog/news/please-help$ https://domain.com/blog/news/please-help [L,NC,R=301]

RewriteRule ^ https://domain.com/rebrand-explained/ [L,NC,R=301]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.