I have one domain abc.ca is already running & google crawled that url.
Now i'm going for abc.com
so how can i manage all URL's of abc.ca -> abc.com
using htacees. Site is built in PHP Joomla.
abc.ca/def.html -> abc.com/def.html
there are thousands of pages. I can't write individual 301 redirection in htaccess.
We can do this in PHP
$uri = "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$newUrl = str_replace(".ca", ".com", $uri);
header("Location: " . $newUrl);
It's better to do on PHP site or htaccess site?