header location newbie

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default header location newbie

    Hi,

    I'm doing a relative URL redirect using this:

    <?

    header("Location: ../research/index.php?current=34");

    ?>

    which works fine, except it redirects to the .org.uk version of my site
    rather than the .org version.

    Where does it get this from ?

    Cheers, N



    Neil Phillips Guest

  2. Similar Questions and Discussions

    1. header('location:
      Hello in the understanding code yesyes is shown on the screen but www.nu.nl is not activated. Does anybode know why thanks Frank <?...
    2. Location Header from class
      I try to call a Location header from an included class. It didn't work. If I didn't include but write the code of the class in the page everything...
    3. #26092 [Opn->Bgs]: header location utf-8
      ID: 26092 Updated by: moriyoshi@php.net Reported By: a_s at seznam dot cz -Status: Open +Status: ...
    4. #26092 [NEW]: header location utf-8
      From: a_s at seznam dot cz Operating system: WinXP,Win2003Server-Web PHP version: 4.3.2 PHP Bug Type: HTTP related Bug...
    5. Re[2]: [PHP] Location referer header
      Hi, Anybody have any sugestion how to pass this data. My only idea is something like this. redir.php?url=www.somehost.com&q=test&pos=1 ...
  3. #2

    Default Re: header location newbie

    thanks Chris, it's just that the muppet that hand coded all of this put
    relative URLs everywhere... and I'm not that keen on a big search and
    replace.

    N
    "Chris Morris" <c.i.morris@durham.ac.uk> wrote in message
    news:87fzlqjq80.fsf@dinopsis.dur.ac.uk...
    > "Neil Phillips" <neil.phillips@ukonline.co.uk> writes:
    > > I'm doing a relative URL redirect using this:
    > > <?
    > >
    > > header("Location: ../research/index.php?current=34");
    > >
    > > ?>
    > > which works fine, except it redirects to the .org.uk version of my site
    > > rather than the .org version.
    > >
    > > Where does it get this from ?
    >
    > At a guess it's something to do with default virtual hosts. Location
    > headers should be absolute URLs anyway (recent browsers *sometimes*
    > let you get away with relative ones, older ones rarely if at all do).
    >
    > So
    > header("Location:
    http://www.example.org/foo/research/index.php?current=34");
    >
    > --
    > Chris

    Neil Phillips 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