PDA

View Full Version : Automatically Link a Website



lipc
01-15-2006, 08:13 PM
Hi Everyone,

Can someone please help me with some html code?

I would like to link a webpage to another webpage automatically.

For example, if people type in www.thisistheexample.com, and I want them to go to www.tite.com automatically, how would i do it?

I hope this makes sense.

Thank you,
Bryan

Mazigh
01-15-2006, 11:31 PM
Hi, i don't know whether i understoot you correctly or not, but i suppose you want to make a hyperlink:
<a href="thelink">you type what you want to type</a>

Zee this:
http://www.mediacollege.com/internet/html/hyperlinks.html

Twey
01-16-2006, 05:18 PM
What you want is a redirect. Taking as granted you own both domains, you have four options:Cause the entire domain thisistheexample.com to redirect. Example on Apache.
# /etc/httpd/conf/httpd.conf
Redirect permanent / http://www.tute.com/ Use a script to redirect. Example in PHP.
<?php
// index.php
header("Location: http://www.tite.com/");
?> Use a meta refresh to redirect (not advised).
<!-- index.html -->
<html>
<head>
<meta http-eqiv="redirect" content="0;url=http://www.tite.com/" />
<title>Redirect</title>
</head>
<body>
<p>
This page has been moved to <a href="http://www.tite.com/">tite.com</a>.
</p>
</body>
</html> Use Javascript to redirect the user (even less advised):
<!-- index.html -->
<html>
<head>
<title>Redirect</title>
</head>
<body>
<script type="text/javascript">
window.location.href = "http://www.tite.com/";
</script>
<p>
This page has been moved to <a href="http://www.tite.com/">tite.com</a>.
</p>
</body>
</html>