Results 1 to 3 of 3

Thread: Automatically Link a Website

  1. #1
    Join Date
    Jan 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Automatically Link a Website

    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

  2. #2
    Join Date
    Jan 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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...yperlinks.html

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    What you want is a redirect. Taking as granted you own both domains, you have four options:
    1. Cause the entire domain thisistheexample.com to redirect. Example on Apache.
      Code:
      # /etc/httpd/conf/httpd.conf
      Redirect permanent / http://www.tute.com/
    2. Use a script to redirect. Example in PHP.
      PHP Code:
      <?php
        
      // index.php
        
      header("Location: http://www.tite.com/");
      ?>
    3. Use a meta refresh to redirect (not advised).
      HTML Code:
      <!-- 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>
    4. Use Javascript to redirect the user (even less advised):
      HTML Code:
      <!-- 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>
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •