RewriteEngine On
RewriteBase /
# redirect all requests to /en/favicon.ico and /de/favicon.ico
# to /favicon.ico
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(en|de)/favicon.ico$ favicon.ico [L,QSA]
# redirect all requests to /en/assets* and /de/assets* to /assets*
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(en|de)/assets(.*)$ assets$2 [L,QSA]
# redirect all requests to /en/site* and /de/site* to /site*
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(en|de)/site(.*)$ site$2 [L,QSA]
# redirect all other requests to /en/* and /de/*
# to index.php and set the cultureKey parameter
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(en|de)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]
This question has been answered by florian@frm. See the first response.
$ms = $this->getMediaSource();
if($ms->getBaseUrl() != '/') {
// $format['src'] = $ms->getBaseUrl().$this->xpdo->call('galAlbum','getFilesUrl',array(&$this->xpdo)).$filename;
$format['src'] = $this->xpdo->call('galAlbum','getFilesUrl',array(&$this->xpdo)).$filename;
}
$ms = $this->getMediaSource();
if($ms->getBaseUrl() != '/') {
// $format['src'] = $ms->getBaseUrl().$this->xpdo->call('galAlbum','getFilesUrl',array(&$this->xpdo)).$filename;
$format['src'] = $this->xpdo->call('galAlbum','getFilesUrl',array(&$this->xpdo)).$filename;
}