0
I have the following urls:
www.meusite.com.br/pagina1
www.meusite.com.br/pagina1/a/b/c
www.meusite.com.br/pagina1/1/2/nome-perfil
I need that when accessing my site, I have a redirection in htaccess to another site, with the same basis, becoming:
www.meunovosite.com.br/pagina1
www.meunovosite.com.br/pagina1/a/b/c
www.meunovosite.com.br/pagina1/1/2/nome-perfil
How can I do that? I already have the following setup on it:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
And in index.php I have:
header("Location: http://www.meunovosite.com.br");
However, if I search my site on Google, it will put the folders that belong to it, and in this case it will be redirected only to the home of the site.
Can’t you set up your application server to give a 301 to the new site? I think it’s the easiest.
– Ricardo
The problem is the subfolders that are indexed by google...
– Sr. André Baill
You can use 301 redirect. With this all the rank is passed to new link
– Ricardo Mota
Can you post an example? Obg.
– Sr. André Baill
One-night stand here that he speaks of Nginx, which is what I’ve done, I do 301 from com.br to . com, he’s 301 on any link with sub folder or not. (I’m no expert on this, but I think it would suit a simple scenario)
– Ricardo