Automatic href

Discussion in 'HTML' started by JohnW, Sep 6, 2006.

  1. JohnW

    JohnW Guest

    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.

    --
    JohnW-Mpls
     
    JohnW, Sep 6, 2006
    #1
    1. Advertising

  2. JohnW wrote:

    > I 'd like to have people who go to one of my sites to be automatically
    > forewarded to another site.


    Do you mean from the first site's main page?

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


    You could use a meta refresh statement which would do what you ask, but
    will break the visitor's Back button. Not polite.

    It would be best to use a tastefully designed page, with some relevant
    text telling them why you want to redirect them, and giving them the
    link if they choose to do it.

    --
    -bts
    -Motorcycles defy gravity; cars just suck.
     
    Beauregard T. Shagnasty, Sep 6, 2006
    #2
    1. Advertising

  3. JohnW

    Ed Mullen Guest

    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.
    >
    > --
    > JohnW-Mpls


    http://www.google.com/search?query=meta refresh&num=50

    --
    Ed Mullen
    http://edmullen.net
    http://mozilla.edmullen.net
    http://abington.edmullen.net
    A shark is the only fish that can blink with both eyes.
     
    Ed Mullen, Sep 6, 2006
    #3
  4. 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
     
    Jonathan N. Little, Sep 6, 2006
    #4
  5. JohnW

    JohnW Guest

    On Wed, 06 Sep 2006 15:09:21 GMT, "Beauregard T. Shagnasty"
    <> wrote:

    >JohnW wrote:
    >
    >> I 'd like to have people who go to one of my sites to be automatically
    >> forewarded to another site.

    >
    >Do you mean from the first site's main page?
    >
    >> 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.

    >
    >You could use a meta refresh statement which would do what you ask, but
    >will break the visitor's Back button. Not polite.
    >
    >It would be best to use a tastefully designed page, with some relevant
    >text telling them why you want to redirect them, and giving them the
    >link if they choose to do it.


    Ah Ha! Meta Refresh Tag. Thanks - just what I was looking for.

    --
    JohnW-Mpls
     
    JohnW, Sep 7, 2006
    #5
  6. JohnW wrote:

    > On Wed, 06 Sep 2006 15:09:21 GMT, "Beauregard T. Shagnasty"
    > <> wrote, in part:
    >
    >> You could use a meta refresh statement which would do what you ask,
    >> but will break the visitor's Back button. Not polite.

    >
    > Ah Ha! Meta Refresh Tag. Thanks - just what I was looking for.


    So ... you elected to be not polite? <lol>

    --
    -bts
    -Motorcycles defy gravity; cars just suck.
     
    Beauregard T. Shagnasty, Sep 7, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CRON
    Replies:
    24
    Views:
    200,911
    Adrienne Boswell
    Jun 20, 2006
  2. Soren Vejrum
    Replies:
    4
    Views:
    655
    Lasse Reichstein Nielsen
    Jul 5, 2003
  3. saiho.yuen
    Replies:
    3
    Views:
    445
    kaeli
    Sep 14, 2004
  4. Replies:
    2
    Views:
    491
  5. Vincent van Beveren

    BASE HREF and A HREF="#" onclick="..."

    Vincent van Beveren, Jul 6, 2006, in forum: Javascript
    Replies:
    2
    Views:
    338
    Vincent van Beveren
    Jul 6, 2006
Loading...

Share This Page