[RESOLVED] Using Parent Paths vs Absolute path in header('Location:xxx')
Results 1 to 4 of 4

Thread: [RESOLVED] Using Parent Paths vs Absolute path in header('Location:xxx')

  1. #1
    Senior Member
    Join Date
    Mar 2010
    Posts
    327

    resolved [RESOLVED] Using Parent Paths vs Absolute path in header('Location:xxx')

    Hi All:

    I am currently using all absolute paths in my location headers. I find that my sight experiences "too many connection" messages occasionally. My hosting co says by using absolute paths the server is opening up a new connection with every location header and recommended I switch them to parent paths.

    I just wanted to run this by you all before I switch this. Security issues (Linux)? PHP issues?

    Thanks in advance...

  2. #2
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,432
    Well for one, I'm guessing by "paths" you actually mean URLs. To that end, note that using relative URLs (e.g. anything that doesn't begin with the protocol, such as 'http://mysite.com/foo') is not currently allowed (though I've heard that might change in the (near?) future).

    For another, it's not the server that's opening any connections at all. It's the client.

    Finally, even if you allow Keep-Alive connections, it's unlikely that using an absolute URL will force the browser to close the connection and try to create a new one. I'll add one caveat - I'm assuming that your absolute URLs use the same protocol and hostname as that which the client used to make the initial request. In other words, you aren't redirecting them to www.mysite.com after they first arrived at mysite.com (since the two are separate, unique hostnames and thus deserve to be treated as such).

    What's more, even if that really were the case, that doesn't justify (IMHO) why that's the source of the problem. If your hosting company can't handle the shape and/or volume of your website's traffic, it doesn't make much sense that the culprit is that you aren't using an HTTP header in a way that would violate the current HTTP standard (albeit in a way that most modern browsers will still be able to handle).

  3. #3
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    Location
    General Systems Vehicle "Thrilled To Be Here"
    Posts
    21,911
    I agree. If that really were the case it would at worst only double the rate the server opening connections (and apparently leaving them open after the client has gone away - but then there's the "Connection:close" header to deal with the caveat mentioned); after all, the client isn't being sent on a treasure hunt through hundreds of redirects, is it?
    THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

  4. #4
    Senior Member
    Join Date
    Mar 2010
    Posts
    327
    Thanks guys. I will leave the absolute paths as is.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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