diff --git a/controllers/extern.php b/controllers/extern.php
index 4cfe7b27519f88b938d612e10b3c9cca77b582ef..dc03f3bc78be088903836d1a093bf4b66399af7c 100644
--- a/controllers/extern.php
+++ b/controllers/extern.php
@@ -5,6 +5,7 @@ class ExternController extends PluginController
 {
     public function xml_action() {
         $this->plugins = MarketPlugin::findBySQL("publiclyvisible = 1 AND approved = 1 ORDER BY name ASC");
+        URLHelper::setBaseUrl($GLOBALS['ABSOLUTE_URI_STUDIP']);
         $this->set_layout(null);
         $this->response->add_header('Content-Type', "text/xml");
     }
diff --git a/views/extern/xml.php b/views/extern/xml.php
index 6313a2826393ab8971e51fff26c767a524b07648..298077a86f2c631c312454b16d514418ff94cde2 100644
--- a/views/extern/xml.php
+++ b/views/extern/xml.php
@@ -6,13 +6,13 @@
         homepage="<?= htmlReady(studip_utf8encode($marketplugin['url'])) ?>"
         short_description="<?= htmlReady(studip_utf8encode($marketplugin['short_description'])) ?>"
         description="<?= htmlReady(studip_utf8encode($marketplugin['description'])) ?>"
-        image="<?= htmlReady(studip_utf8encode($GLOBALS['ABSOLUTE_URI_STUDIP'].$marketplugin->getLogoURL())) ?>">
+        image="<?= htmlReady(studip_utf8encode($marketplugin->getLogoURL())) ?>">
         <? foreach ($marketplugin->releases as $release) : ?>
         <release
             version="<?= htmlReady(studip_utf8encode($release['version'])) ?>"
             studipMinVersion="<?= htmlReady(studip_utf8encode($release['studip_min_version'])) ?>"
             studipMaxVersion="<?= htmlReady(studip_utf8encode($release['studip_min_version'])) ?>"
-            url="<?= htmlReady(studip_utf8encode($GLOBALS['ABSOLUTE_URI_STUDIP']."plugins.php/pluginmarket/presenting/download/" . $release->getId())) ?>"
+            url="<?= htmlReady(studip_utf8encode($controller->url_for('presenting/download/' . $release->getId()))) ?>"
             />
         <? endforeach ?>
     </plugin>