Roundcube SVN trunk r 4560 and lower (http://trac.roundcube.net/changeset/4561):
_________________________________________________________________________________________________
Replace 'plublic function write' in ./program/includes/rcube_html_page.php around line 171 by ...
_________________________________________________________________________________________________

    public function write($templ='', $base_path='')
    {
        $output = empty($templ) ? $this->default_template : trim($templ);

        // set default page title
        if (empty($this->title)) {
            $this->title = 'Roundcube Mail';
        }

        // replace specialchars in content
        $page_title  = Q($this->title, 'show', FALSE);
        $page_header = '';
        $page_footer = '';

        // include meta tag with charset
        if (!empty($this->charset)) {
            if (!headers_sent()) {
                header('Content-Type: text/html; charset=' . $this->charset);
            }
            $page_header = '<meta http-equiv="content-type"';
            $page_header.= ' content="text/html; charset=';
            $page_header.= $this->charset . '" />'."\n";
        }

        // definition of the code to be placed in the document header and footer
        if (is_array($this->script_files['head'])) {
            foreach ($this->script_files['head'] as $file) {
                $page_header .= sprintf($this->script_tag_file, $file);
            }
        }

        $head_script = $this->scripts['head_top'] . $this->scripts['head'];
        if (!empty($head_script)) {
            $page_header .= sprintf($this->script_tag, $head_script);
        }

        if (!empty($this->header)) {
            $page_header .= $this->header;
        }

        if (is_array($this->script_files['foot'])) {
            foreach ($this->script_files['foot'] as $file) {
                $page_footer .= sprintf($this->script_tag_file, $file);
            }
        }

        if (!empty($this->scripts['foot'])) {
            $page_footer .= sprintf($this->script_tag, $this->scripts['foot']);
        }

        if (!empty($this->footer)) {
            $page_footer .= $this->footer;
        }

        // find page header
        if ($hpos = stripos($output, '</head>')) {
            $page_header .= "\n";
        }
        else {
            if (!is_numeric($hpos)) {
                $hpos = stripos($output, '<body');
            }
            if (!is_numeric($hpos) && ($hpos = stripos($output, '<html'))) {
                while ($output[$hpos] != '>') {
                    $hpos++;
                }
                $hpos++;
            }
            $page_header = "<head>\n<title>$page_title</title>\n$page_header\n</head>\n";
        }

        // add page hader
        if ($hpos) {
            $output = substr($output,0,$hpos) . $page_header . substr($output,$hpos,strlen($output));
        }
        else {
            $output = $page_header . $output;
        }

        // add page footer
        if (($fpos = strripos($output, '</body>')) || ($fpos = strripos($output, '</html>'))) {
            $output = substr($output, 0, $fpos) . "$page_footer\n" . substr($output, $fpos);
        }
        else {
            $output .= "\n".$page_footer;
        }

        // add css files in head, before scripts, for speed up with parallel downloads
        if (!empty($this->css_files) && 
            (($pos = stripos($output, '<script ')) || ($pos = stripos($output, '</head>')))
        ) {
            $css = '';
            foreach ($this->css_files as $file) {
                $css .= sprintf($this->link_css_file, $file);
            }
            $output = substr($output, 0, $pos) . $css . substr($output, $pos);
        }

        $this->base_path = $base_path;

        // correct absolute paths in images and other tags
        // add timestamp to .js and .css filename
        $output = preg_replace_callback(
            '!(src|href|background)=(["\']?)([a-z0-9/_.-]+)(["\'\s>])!i',
          array($this, 'file_callback'), $output);
        $output = str_replace('$__skin_path', $base_path, $output);

        $hook = rcmail::get_instance()->plugins->exec_hook("send_page", array('content' => $output));

        if (!$hook['abort']) {
            $output = $hook['content'];
            if ($this->charset != RCMAIL_CHARSET)
                echo rcube_charset_convert($output, RCMAIL_CHARSET, $this->charset);
            else
                echo $output;
        }
        else {
            exit;
        }
    }
_________________________________________________________________________________________________
index.php
_________________________________________________________________________________________________
<?php
/*
 +-------------------------------------------------------------------------+
 | Roundcube Webmail IMAP Client                                           |
 | Version 0.5.1                                                           |
 |                                                                         |
 | Copyright (C) 2005-2011, Roundcube Dev. - Switzerland                   |
 |                                                                         |
 | This program is free software; you can redistribute it and/or modify    |
 | it under the terms of the GNU General Public License version 2          |
 | as published by the Free Software Foundation.                           |
 |                                                                         |
 | This program is distributed in the hope that it will be useful,         |
 | but WITHOUT ANY WARRANTY; without even the implied warranty of          |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           |
 | GNU General Public License for more details.                            |
 |                                                                         |
 | You should have received a copy of the GNU General Public License along |
 | with this program; if not, write to the Free Software Foundation, Inc., |
 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.             |
 |                                                                         |
 +-------------------------------------------------------------------------+
 | Author: Thomas Bruederli <roundcube@gmail.com>                          |
 +-------------------------------------------------------------------------+

 $Id: index.php 4509 2011-02-09 10:51:50Z thomasb $

*/

/* Begin mod request_saver_plugin */
$_SERVER['REQUEST_URI_PATH'] = preg_replace('/\?.*/', '', $_SERVER['REQUEST_URI']);
$repl = 'index.php';
if(strtolower($_SERVER['PHP_SELF']) == '/index.php')
  $repl = '/index.php';
$segments = explode('/', trim(str_replace(str_replace($repl,'',$_SERVER['PHP_SELF']),'',$_SERVER['REQUEST_URI_PATH']), '/'));
for($i=0;$i<count($segments);$i=$i+2){
  if(isset($segments[$i+1])){
    $_GET[$segments[$i]] = $segments[$i+1];
  }
}
/* End mod request_saver_plugin */