public function prepareUrlForNoSession($sUrl)
    {
        /** @var \OxidEsales\Eshop\Core\StrRegular $oStr */
        $oStr = getStr();

        // cleaning up session id..
        $sUrl = $oStr->preg_replace('/(\?|&(amp;)?)(force_)?(admin_)?sid=[a-z0-9\._]+&?(amp;)?/i', '\1', $sUrl);
        $sUrl = $oStr->preg_replace('/(&amp;|\?)$/', '', $sUrl);

        if (\OxidEsales\Eshop\Core\Registry::getUtils()->seoIsActive()) {
            return $sUrl;
        }

        if ($qpos = $oStr->strpos($sUrl, '?')) {
            if ($qpos == $oStr->strlen($sUrl) - 1) {
                $sSep = '';
            } else {
                $sSep = '&amp;';
            }
        } else {
            $sSep = '?';
        }

        if (!$oStr->preg_match('/[&?](amp;)?lang=[0-9]+/i', $sUrl)) {
            $sUrl .= "{$sSep}lang=" . \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage();
            $sSep = '&amp;';
        }

        $oConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
        if (!$oStr->preg_match('/[&?](amp;)?cur=[0-9]+/i', $sUrl)) {
            $iCur = (int) $oConfig->getShopCurrency();
            if ($iCur) {
                $sUrl .= "{$sSep}cur=" . $iCur;
            }
        }

        return $sUrl;
    }