Re-directing outsiders to a universal URL

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Re-directing outsiders to a universal URL

    What code is to be placed in a page so that visitors from a url outside of my domain will be automatically transferred to a universal start page (eg. index.htm)? I'm sure it is easy but cant work it out. Thanks for your help.




    Danny267 webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. Acrobat 8 Universal?
      There's some confusion about the new Acrobat 8 on some of the Mac forums. The system requirements list "G3, G4 or Intel processors", but no mention...
    2. Flash 9 universal binary help!
      I've recently installed the universal flash 9 download, and it has no taken effect. When trying to view Flash a quicktime question mark/logo...
    3. Re-directing a page to a different address based on acriteria
      Hello All, I created an update page that once the user made the necessary changes and click the update button that record would drop-off from the...
    4. Directing Domains
      Hi, I have never used ASP in my life so I NEED HELP!!! I have heard it is possible to create an asp script that when someone connects to a web...
    5. Directing server php return page
      How do I have the server-side php script open up a new client window, rather than having it return to the client page that invoked the php script in...
  3. #2

    Default Re: Re-directing outsiders to a universal URL

    ASP:
    If Request.ServerVariables("HTTP_REFER") = "" Then
    Reponse.Redirect "index.htm"
    End If

    PHP:
    if ($_SERVER['HTTP_REFERER') == '') { header('location: index.htm'); }

    JavaScript:
    <script type="text/javascript">
    if (window.location.referer == '') this.document.location.href='index.htm'; }
    </script>


    --
    - Troyan <dnunes@email.com>


    Troyan Guest

  4. #3

    Default Re: Re-directing outsiders to a universal URL

    Javascript:

    if(!document.referrer){location="index.htm";}

    Note the spelling of "referrer", and the references.
    Mick

    Troyan wrote:
    > ASP:
    > If Request.ServerVariables("HTTP_REFER") = "" Then
    > Reponse.Redirect "index.htm"
    > End If
    >
    > PHP:
    > if ($_SERVER['HTTP_REFERER') == '') { header('location: index.htm'); }
    >
    > JavaScript:
    > <script type="text/javascript">
    > if (window.location.referer == '') this.document.location.href='index.htm'; }
    > </script>
    >
    >
    > --
    > - Troyan <dnunes@email.com>
    >
    >
    mick_white Guest

  5. #4

    Default Re: Re-directing outsiders to a universal URL

    Does this work when the user's followed an external link to the page, such
    as from a search engine?


    mick_white wrote:
    > Javascript:
    >
    > if(!document.referrer){location="index.htm";}
    >
    > Note the spelling of "referrer", and the references.
    > Mick

    rob :: digitalburn Guest

  6. #5

    Default Re: Re-directing outsiders to a universal URL

    Hum, according to DW's JS referrence, it doesn't - it says the string is
    filled any time a user follows a link to the page, and I assume that
    includes external links. I guess you can just do a string comparison to see
    if it's internal or external though.

    rob :: digitalburn wrote:
    > Does this work when the user's followed an external link to the page,
    > such as from a search engine?
    >
    >
    > mick_white wrote:
    >> Javascript:
    >>
    >> if(!document.referrer){location="index.htm";}
    >>
    >> Note the spelling of "referrer", and the references.
    >> Mick

    rob :: digitalburn Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139