Hi All,
Is there a way to remove the session id from the url (use cookie, other, etc.)???
Zen Cart 1.3.8a
Thanks.
Hi All,
Is there a way to remove the session id from the url (use cookie, other, etc.)???
Zen Cart 1.3.8a
Thanks.
After clicking on a link, the session ID should disappear if the customer's browser is properly configured to set session cookies and your server is properly setting said cookies.
Otherwise it remains.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Hi DrByte,
Thanks for the reply. The reason I ask is an SEO firm recommended removing the session id (if possible) from the initial url for better SEO practice/recognition.
It is only there on initial access to the site and then disappears, but they recommended that it not be there at all. Is there a way to have it not show at all?
Thanks.
I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me
Of course they would. That's their job.
Short answer: No.
Long answer: It's complicated. There's even a contribution that tries to do this, but it's quirky and not fully reliable, with the downside being that visitors cannot reach your site if it's misbehaving. Not recommended for live sites that want to not turn away customers.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
DrByte, can you confirm or deny the comment by yellow1912?
"search engines wont get that anyway. zenid is not created when spiders visit your site"
That's entirely dependent on whether the shopowner has muddled with the sessions settings in the admin. By default the "Prevent Spider Sessions" option is set to true, meaning that search engine crawlers (aka spiders) will not experience normal session behavior.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
That's what I thought as well. Always good to get confirmation.
Should also help others -- with the same question -- in finding a quick & correct answer.![]()
How about adding " || $_GET['zenid']" to the code in \includes\templates\*\common\html_header.php
like this around line 30 (note I removed the 'define()' check)
So then any time there is a zenid in the URL the page is considered a "noindex" page, search engines will generally avoid storing it.Code:<?php if (in_array($current_page_base,explode(",",constant('ROBOTS_PAGES_TO_SKIP'))) || $current_page_base=='down_for_maintenance' || $_GET['zenid']) { ?> <meta name="robots" content="noindex, nofollow" /> <?php } ?>
Doing that won't likely make much difference, and could actually cause you some problems.
The only time a search engine gets a zenid is when they pick up a link posted somewhere that's got the zenid attached.
And if your server is properly built, having recreate-session enabled should prevent any risk of session hijacking even if the zenid does get passed on.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.