cancel
Showing results for 
Search instead for 
Did you mean: 

I have disabled SID from backend but It still showing on URL

SOLVED

I have disabled SID from backend but It still showing on URL

I have disabled SID from backend but It still showing on URL ,How should I do to remove sid?s86Fy

my magento version is 2.1.7

php version is 7.0.16

 

Thanks

2 REPLIES

Re: I have disabled SID from backend but It still showing on URL

Could I change protected $_useSessionInUrl = true to $_useSessionInUrl = false in Sidresolver.php, How to overwrite this file?

Re: I have disabled SID from backend but It still showing on URL

@Magentobiz_com

 

Usually setting 'Use SID on storefront' to no fixes the issue. You may need to reindex magento to see the change. 

 

Assuming that you use apache as your web server, you could disable SID using htaccess as below: 

The solution is simple. Go to your .htaccess fine and find the line that says

RewriteEngine on 

If you want to have www part:

RewriteEngine on 
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]

If you don’t want to have www part:

RewriteEngine on 
RewriteCond %{HTTP_HOST} !^yourdomain\.com$ [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [R=301,L]

 

Magento Certified Solution Specialist | Lead Magento developer
If this response was helpful to you, consider giving kudos to this post