so far we've been working with mostly absolute links which is now causing us an issue because we have 2 different domains for the same language, (.at and .de) and both are sharing the same cms pages categories etc.

But these contain absolute links like: https://myhost.de/contact etc. which obviously are a problem for when used within the .at domain.

How can we address this issue without using relative links which aren't an option because they causing 404 errors.

I guess we could use something like {{base url=''}} or {{store url=''}} inside of cms blocks, but this doesn't seem to work for the url field in categories or for the top menu etc. Maybe I'm just doing something wrong.

1 Answer 1


In .phtml you can get the baseurl like this, e.g. for /contact;

  <?php echo Mage::getBaseUrl().'contact'; ?>
  • 1
    Thanks for your answer. This works great but unfortunately is not what I meant. I am talking about the configuration in the backend. I was trying to use something like posted above: {{base url=''}} or {{store url=''}} which didn't work because I just got added to the URL instead of being translated into a new URL. In the General -> Web Section there are URLs added like this: {{unsecure_base_url}}media/ maybe this will work, I didn't try because I was able to solve my problem for now by just adding a slash before the relative URL, like this: /contact
    – Chaz
    Commented May 16, 2018 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.