Comments

Gravatar

For the lighttpd code, taxonomy autocomplete feature doesn’t work. I have done some investigations and it seems to fail because of encoding of the comma “,” character.

After doing some tests, the following code seems to work right using the urldecode() function to convert from %XX to special characters:

if (strpos($_SERVER['SERVER_SOFTWARE'], 'lighttpd') !== false) {
    $_lighty_url = $base_url.$_SERVER['REQUEST_URI'];
    $_lighty_url = @parse_url($_lighty_url);

    if ($_lighty_url['path'] != '/index.php' && $_lighty_url['path'] != '/'
            && $_lighty_url['path'] != '/update.php') {
        $_SERVER['QUERY_STRING'] = $_lighty_url['query'];
        parse_str($_lighty_url['query'], $_lighty_query);
        foreach ($_lighty_query as $key => $val)
            $_GET[$key] = $_REQUEST[$key] = urldecode($val);
        $_GET['q'] = $_REQUEST['q'] = urldecode(substr($_lighty_url['path'], 1));
    }       
}

Reply

The content of this field is kept private and will not be shown publicly.

More information about formatting options