Posted by Jonathan N. Little on 12/22/58 11:57
JohnW wrote:
> I 'd like to have people who go to one of my sites to be automatically
> forewarded to another site.
>
> How can I do this in HTML - in the Index.html file?
>
> I could write a simple <a href="http://XD">XD</a> but that would
> require the visitor to "click" to go to the other site.
>
I think what you are looking for is called 'redirection', typically used
when your change or get a domain name.
example 1 where you change domain
www.olddomain.com >> www.newdomain.com
example 2 where you stop using your freebe ISP space and get real hosting
www.myISP.com/~freebeUserHosting >> www.newdomain.com
If is explain your situation then metta-refresh method in the index page
of the 'old' URL but this is really a poor method
If old hosting is Apache you can use (if allowed) an .htaccess file in
your old server to redirect:
RewriteEngine on
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
If you don't have the .htaccess option then if you have CGI on old
server you can make you old sites index page a PHP file and rewite the
header
example index.php:
$newDomain="http://www.example.com" //your new domain
$requestURI=$_SERVER['REQUEST_URI'];
header("Location: $newDomain$requestURI");
exit;
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
[Back to original message]
|