Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2008
    Posts
    24
    Plugin Contributions
    0

    Default Full URLs in Internal Links

    Is there any reason why Zen Cart uses full URLs in its internal links?

    the reason I ask is that I'm trying to cut the code down as much as possible, and reckon I can knock off another 12% if I can get rid of the full URLs and just use relative URLs... is there a way to configure the store to do that, or will I have to go through the template and edit all the files?

    But I don't want to do it if there is a good reason for the full urls

    Many thanks

  2. #2
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Full URLs in Internal Links

    As far as I know ZC only uses relative links (URLs) - in fact, using relative links is recommended throughout.

  3. #3
    Join Date
    Oct 2005
    Location
    Chicago, IL USA
    Posts
    1,587
    Plugin Contributions
    29

    Default Re: Full URLs in Internal Links

    Quote Originally Posted by frank18 View Post
    As far as I know ZC only uses relative links (URLs) - in fact, using relative links is recommended throughout.
    Yep, that's correct. The links are relative. The link displayed in the browser footer bar (or whatever it's called) is created by adding the store base to the relative url so you see the full url.

  4. #4
    Join Date
    Nov 2008
    Posts
    24
    Plugin Contributions
    0

    Default Re: Full URLs in Internal Links

    How wierd... all my zen cart generated internal links are full absolute urls...

    and here is the demo page from zen cart templates

    http://(sorry, site offline)/1-3-8a/

    have a look at the source... full urls for internal links as well...

    Have I set it up wrong?

  5. #5
    Join Date
    Nov 2008
    Posts
    24
    Plugin Contributions
    0

    Default Re: Full URLs in Internal Links

    Had a look at the sites in your sigs... they also use full urls?

  6. #6
    Join Date
    Oct 2005
    Location
    Chicago, IL USA
    Posts
    1,587
    Plugin Contributions
    29

    Default Re: Full URLs in Internal Links

    I think we're talking about the same thing but in a different way. When you view the source code, yes, it's a full url. But the full url is created by Zen from the base url for your site (from the config files) and the relative url within the site. This is what allows you to move a site without re-coding all the links. It's in that sense that they are relative urls.

    As to your original question, the SE's like links that are full versus relative.

  7. #7
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Full URLs in Internal Links

    Quote Originally Posted by jeking View Post
    ....When you view the source code, yes, it's a full url. But the full url is created by Zen from the base url for your site (from the config files) and the relative url within the site. This is what allows you to move a site without re-coding all the links. It's in that sense that they are relative urls......
    Yep, that's exactly how it works. So, don't waste your time trying to shave 12% (???) off the code.

  8. #8
    Join Date
    Nov 2008
    Posts
    24
    Plugin Contributions
    0

    Default Re: Full URLs in Internal Links

    Quote Originally Posted by frank18 View Post
    Yep, that's exactly how it works. So, don't waste your time trying to shave 12% (???) off the code.
    I've already cut out 56%

    I understand what you are saying, but I still want it gone :) will have a look into the code and see if I can cut it out... can't see any reason for it...

  9. #9
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Full URLs in Internal Links

    Quote Originally Posted by sephiroth View Post
    ...... I understand what you are saying, but I still want it gone :) will have a look into the code and see if I can cut it out... can't see any reason for it...
    Good Luck in reinventing the wheel - interested in what you can come up with

  10. #10
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,252
    Plugin Contributions
    59

    Default Re: Full URLs in Internal Links

    Quote Originally Posted by sephiroth View Post
    I've already cut out 56%

    I understand what you are saying, but I still want it gone :) will have a look into the code and see if I can cut it out... can't see any reason for it...
    Relative urls are not commonly used in the source view because then scrapers can grab your whole site and display it on their own domain path.

    ~Melanie
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

 

 

Similar Threads

  1. v150 Internal Server Error after installing ultimate sep urls
    By selcyis in forum Upgrading to 1.5.x
    Replies: 5
    Last Post: 19 Aug 2012, 10:15 PM
  2. EZ-Page Internal Link URLs not working
    By vitaminx in forum Basic Configuration
    Replies: 2
    Last Post: 7 Mar 2011, 08:10 PM
  3. Internal Links Dynamic Urls
    By hemz in forum General Questions
    Replies: 1
    Last Post: 12 May 2008, 09:45 AM
  4. Replies: 1
    Last Post: 11 Jun 2007, 05:33 PM
  5. EZ-Pages: Internal/External URLs Do Not Show in TOC
    By ts232 in forum Basic Configuration
    Replies: 0
    Last Post: 11 Apr 2007, 03:41 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