Redirecting of Urls

Asked

Viewed 48 times

-1

Good morning!

I have 2 wordpress sites (1 will be deleted) and are with duplicate posts, put exported and imported in the other. Is there a way for me to redirect all urls at once? Example:

Whatever www.site1.com turns www.site2.com, so if we have a URL: www.site1.com/olamundo it would turn www.site2.com/olamundo

Is there any way to redirect 301? There are over 500 posts, and I would need to redirect everything at once.

1 answer

3


Through . htaccess you can redirect

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^DOMINIOANTIGO\.com$ [NC]
RewriteRule ^(.*)$ http://NOVODOMINIO.com [R=301,L]
  • Jefferson, thanks! How would I look if I had a domain like this: www.meusite.com.br/blog and www.meusite2.com.br/blog ?

  • 1

    I believe that Rewriterule (.*)$ http://www.novodominio.com/$1 [R=301,L] must resolve

Browser other questions tagged

You are not signed in. Login or sign up in order to post.