Results 1 to 10 of 21

Hybrid View

  1. #1
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: Is <base href tag necessary?

    Quote Originally Posted by lhungil View Post
    If desired (to avoid having to specify the anchor with the page - such as "index.php?main_page=index#anchor"), one CAN remove the base href from the web page template without any major issues when NO URLs outside the installation root are used.
    So that would have been my other solution then, right? To specify the anchor links as you showed? I didn't know that. That would have been fine too and I'll keep that in mind, if I'm understanding you correctly.

  2. #2
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Is <base href tag necessary?

    Virtual URLs (aka "alternate", "pretty", "friendly", "short", etc) are one common case. Not all Virtual URLs are for "SEO friendly" purposes, some are to comply with requirements or overcome restrictions in external software. Some third party modules adding a "page" in a subdolder are another case. Basically any scenario where the URL could contain a "sub-directory".


    I suspect the base element is there as a "safety" feature because some of the Zen Cart code and some 3rd party modifications generate COMPLETELY relative URLs. In my experience the core development team strive to ensure Zen Cart will work for ALL users in as many scenarios as possible, thus the base element is added by the default template.


    If leaving the base element... When the anchor link is stored in the DB, specifying as ahown in the previous post will work (there are some other programmatic solutions as well). If in a PHP file, would recommend using the Zen Cart function to generate the URL and add the anchor afterwards (provides best long term compatibility).


    NOTE: I am not one of the core developers and am not speaking on their behalf. I am providing an answer based on my experience.The other people who have responded are also very knowledgable and should not be dismissed (and many of them are experienced Zen Cart consultants and / or developers).
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  3. #3
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: Is <base href tag necessary?

    I have a better understanding now. Thank you very much.

 

 

Similar Threads

  1. base href problem
    By cricles in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 20 Jul 2010, 06:34 AM
  2. SSL Problem (Base href???)
    By DaveS in forum General Questions
    Replies: 24
    Last Post: 4 Sep 2009, 06:23 PM
  3. Base HREF https issues
    By mikebackhouse in forum General Questions
    Replies: 38
    Last Post: 27 May 2009, 05:12 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