Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

    Default remove session id from url

    Hi All,

    Is there a way to remove the session id from the url (use cookie, other, etc.)???

    Zen Cart 1.3.8a

    Thanks.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: remove session id from url

    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.

  3. #3
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

    Default Re: remove session id from url

    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.

  4. #4
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: remove session id from url

    Quote Originally Posted by gsdcypher View Post
    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.
    But search engines wont get that anyway. zenid is not created when spiders visit your site, i believe.
    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

  5. #5
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: remove session id from url

    Quote Originally Posted by gsdcypher View Post
    ... an SEO firm recommended removing the session id (if possible) from the initial url for better SEO practice/recognition.
    Of course they would. That's their job.

    Quote Originally Posted by gsdcypher View Post
    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?
    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.

  6. #6
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: remove session id from url

    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"

  7. #7
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: remove session id from url

    Quote Originally Posted by yellow1912 View Post
    But search engines wont get that anyway. zenid is not created when spiders visit your site, i believe.
    Quote Originally Posted by Website Rob View Post
    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.

  8. #8
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: remove session id from url

    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.

  9. #9
    Join Date
    Jun 2006
    Posts
    56
    Plugin Contributions
    0

    red flag Re: remove session id from url

    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)

    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 } ?>
    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.

  10. #10
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: remove session id from url

    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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. how can i remove zen id From admin login url??
    By crixus in forum General Questions
    Replies: 4
    Last Post: 3 Nov 2013, 09:44 PM
  2. Remove folder name from URL?
    By weljkodj in forum Installing on a Linux/Unix Server
    Replies: 7
    Last Post: 14 Jun 2011, 01:18 PM
  3. Remove URL Rewriting from Checkout Page - Ultimate SEO URLs
    By NewbietoEC in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 18 Aug 2010, 02:51 PM
  4. Replies: 25
    Last Post: 28 Jun 2009, 07:54 AM
  5. Session ID's in URL
    By GeXus in forum General Questions
    Replies: 7
    Last Post: 16 May 2007, 10:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg