Redirecting an entire domain [RESOLVED]
Posted: Tue Nov 03, 2009 8:26 am
I am changing a site's domain name and looking for a way to redirect any traffic to the original domain name, let's call that "siteA.com", to the new one, "siteB.com". I currently use several header type redirects which work great for individual pages, but now I am looking for a way to redirect all visitors to any page on "siteA.com" to "siteB.com", not just visitors to a specific page.
I am hoping to find an easy way to do this with PHP, short of adding the header function to every page, or perhaps some non-PHP method (htaccess?).
I want a visitor to end up on "siteB.com/index.php" regardless of whether he/she visits
siteA.com/abc/index.php
or
siteA.com/def/index.php
or
siteA.com/xyz/index.php
etc...
I can't be the first person to want to change a site's URL so there must be some easy way to do it. If anyone could point me in the right direction, it would be greatly appreciated
.
Marcus
I am hoping to find an easy way to do this with PHP, short of adding the header function to every page, or perhaps some non-PHP method (htaccess?).
I want a visitor to end up on "siteB.com/index.php" regardless of whether he/she visits
siteA.com/abc/index.php
or
siteA.com/def/index.php
or
siteA.com/xyz/index.php
etc...
I can't be the first person to want to change a site's URL so there must be some easy way to do it. If anyone could point me in the right direction, it would be greatly appreciated
Marcus