I hope I am posting in the appropriate forum. If not, please correct me.
I run a small hosting business using an EV!Servers box (Linux, Red Hat, Ensim CP).
A client owns two domain names. Let's call them:
sampleONE.com
sampleTWO.com
The client wants vistors who call for sampleONE.com to be directed to the web site at sampleTWO.com. An important element is that this should be done transparently, with minimal delay and the browser URL field should show the URL as sampleTWO.com.
I suspect this could be with a PHP script installed on the index page of sampleONE.com and I'm hoping someone can suggest one.
Advice please?
[SOLVED] URL redirection script? or ???
Moderator: General Moderators
Thank you for your response.
I just went throiugh the entire section of the PHP Manual on Headers, every last word. I did not find anything there that seemed to address my question. If it did, it's couched in terms of some other issue that does not appear, to me, to be relevant.
Does anyone else have any other suggestions?
And, to the moderator, please do not mark the question solved. It may be for you but it's not for me and I think that's the point of a forum.
I just went throiugh the entire section of the PHP Manual on Headers, every last word. I did not find anything there that seemed to address my question. If it did, it's couched in terms of some other issue that does not appear, to me, to be relevant.
Does anyone else have any other suggestions?
And, to the moderator, please do not mark the question solved. It may be for you but it's not for me and I think that's the point of a forum.
Code: Select all
header("Location: http://www.php.net/header");P.S.: Moved to PHP Code
It could be done with mod_rewrite:
Code: Select all
RewriteEngine On
RewriteRule ^/(.+) http://sampleTWO.com/$1 їR,L]