Problem with seo link in ssl env

My client has ssl installed in his server and admin is running in https:// . Now when I tried to create seo url for articles , its adding a force sid in standard url and its not accessible in front end then. How to get rid of it or what is the solution?

FYI : force sid is added from url() of oxsession.php.

Hi,

its adding a force sid in standard url and its not accessible in front end then

This shall not happen by default. The only thing you had to do switching to SSL is to alter your config.inc.php.

Regards

Hi everbody,

I want to push this topic again, because we are in the same position!
We’ve switched to SSL (admin and backend), but it still doesn’t work.

We found the position in source-code where this “could be fixed” in core/oxseoencoder.php:

    
protected function _trimUrl( $sUrl, $iLang = null )
    {
    	$sUrl = str_replace( $this->getConfig()->getShopURL( $iLang ), '', $sUrl );
        return preg_replace( '/(force_)?sid=[a-z0-9\.]+&?(amp;)?/i', '', $sUrl );
    }


URL before:    index.php?force_admin_sid=7f651b5e26892ef296effd8479c04262&cl=content&oxcid=7f65eedb41dc2f5c586fd6dcc40a5d89
URL after:     index.php?force_admin_cl=content&oxcid=7f65eedb41dc2f5c586fd6dcc40a5d89
But should be: index.php?cl=content&oxcid=7f65eedb41dc2f5c586fd6dcc40a5d89

[B]But we don’t want to change such basic functions![/B]

This topic is very important for our client, so we hope for fast replies…

@mousumi: Did you solve this problem?

Thanks & regards
Jens

This should be solved in 4.3.0:
https://bugs.oxid-esales.com/view.php?id=1423
https://bugs.oxid-esales.com/changelog_page.php

Hi leofonic,

thank you. But we can’t update to the “brand-new” version 4.3.0, because we are actually coming up to a final state of our lifelong project.
Is there any quick fix we could import?
Or could we just update the _trimUrl method?

Before:


    protected function _trimUrl( $sUrl, $iLang = null )
    {
    	$sUrl = str_replace( $this->getConfig()->getShopURL( $iLang ), '', $sUrl );
        return preg_replace( '/(force_)?sid=[a-z0-9\.]+&?(amp;)?/i', '', $sUrl );
    }

After:

    
    protected function _trimUrl( $sUrl, $iLang = null )
    {
        $myConfig = $this->getConfig();
        $sUrl = str_replace( array( $myConfig->getShopUrl( $iLang ), $myConfig->getSslShopUrl( $iLang ) ), '', $sUrl );
        $sUrl = preg_replace( '/(\?|&(amp;)?)(force_)?(admin_)?sid=[a-z0-9\.]+&?(amp;)?/i', '\1', $sUrl );
        $sUrl = preg_replace( '/(\?|&(amp;)?)shp=[0-9]+&?(amp;)?/i', '\1', $sUrl );
        $sUrl = preg_replace( '/(\?|&(amp;)?)lang=[0-9]+&?(amp;)?/i', '\1', $sUrl );
        $sUrl = preg_replace( '/(\?|&(amp;)?)&(amp;)?/i', '\1', $sUrl );
        return $sUrl;
    }

The thing is that we are afraid of any side effects…

Regards
Jens

To me it looks OK to replace it without getting side effects, but you’ll have to test yourself.