Wondering if Apache is restoring encoded square brackets at my website host

Discussion in 'Apache' started by HenrikB, May 18, 2010.

  1. #1
    A puzzle,

    I'm sending off a redirect from within php using urlencode() as (for example)

    %3Flaws%5Breferenceid%5D%3D31%26laws%5Brecordoffset%5D%3D%26laws%5Bpagerecordoffset%5D%3D0%26laws%5Bsearch%5D%3D%26laws%5Bsearchfield%5D%3D%26laws%5Bsortfield%5D%3DName%26laws%5Bdirection%5D%3D%26laws%5Bfile%5D%3Dall-files%26laws%5Blabel%5D%3Dall-labels

    But it shows up in my browsers (I've tried Firefox and Chrome) as

    http://celos.ca/datadev/reglaws/table%3Flaws[referenceid]%3D31%26laws[recordoffset]%3D%26laws[pagerecordoffset]%3D0%26laws[search]%3D%26laws[searchfield]%3D%26laws[sortfield]%3DName%26laws[direction]%3D%26laws[file]%3Dall-files%26laws[label]%3Dall-labels

    Almost the same thing, with the important exception that the %5B %5D are restored to the literal "[" and "]", while the other special characters remain encoded. This restoration to literals is unwanted (and unrequested by any php code that I can find).

    I can't figure out what's restoring the literal square brackets, and wondered if by chance there's a setting somewhere on the apache server that might be doing it.

    Does anyone have any insight into this?

    Thanks,

    - Henrik
     
    HenrikB, May 18, 2010 IP