You are here: Re: Automatic href « HTML « IT news, forums, messages
Re: Automatic href

Posted by Jonathan N. Little on 11/17/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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация