URL redirection

-1

Good morning!

I have 2 wordpress sites (1 will be erased) and have duplicate posts, I have exported and imported in the other. Is there a way I can redirect all urls at once? Example:

Everything that goes www.site1.com go to www.site2.com, so if we have a URL: www.site1.com/olamundo it would become www.site2.com/olamundo

Can you do 301 redirect in any way? There are more than 500 posts, and you would need to redirect everything at once.

    
asked by anonymous 10.04.2017 / 13:50

1 answer

3

Using .htaccess you can do the redirect

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^DOMINIOANTIGO\.com$ [NC]
RewriteRule ^(.*)$ http://NOVODOMINIO.com [R=301,L]
    
10.04.2017 / 13:54