Redirect .com.br domain to .com

2

I have two domains: the main one is the .com and the secondary is the .com.br

I need to make it every time you go to www.domain.com, it redirects to www.domain.com, even when you have a subfolder, for example: www.domain.com/test redirect to www .domain.com / test

The host I use is iPage.

    
asked by anonymous 13.01.2015 / 18:08

1 answer

2

Have .htaccess? Apache server? You could use mod_rewrite to do this.

RewriteEngine on
RewriteCond %{HTTP_HOST} !^example\.com$
RewriteRule ^ http://example.com%{REQUEST_URI} [L,R=301]

link

    
13.01.2015 / 18:26