Question

How I to do redirect in .htaccess in this way?

How I to do a redirect in .htaccess in this way?

www.domain.com/blog/* --> www.domain2.com/* www.domain.com/blog/ir/* --> www.domain2.com/ir/*

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Add the following to domain.com’s .htaccess:

RedirectMatch 301 ^/blog/(.*)$ http://www.domain2.com/$1

Take a look at the following tutorial: