Results 1 to 6 of 6
  1. #1
    Join Date
    May 2009
    Posts
    413
    Plugin Contributions
    0

    link problem Extra Forward Slash Before Links...

    I was just looking at my sites page source and noticed that the links to the stylesheets all have a forward slash / before them like this:

    Code:
    <link rel="stylesheet" type="text/css" href="/includes/templates/my_template/css/stylesheet.css" />
    I have looked at a few other Zen Cart showcase stores and believe they shouldn't (?) have the forward slash and should in fact look like this:

    Code:
    <link rel="stylesheet" type="text/css" href="includes/templates/my_template/css/stylesheet.css" />
    What could cause this to happen? Have I edited something wrongly in the configure.php files - I can paste them into this thread if required.

    Thanks

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Extra Forward Slash Before Links...

    Well ... if it's not preventing your stylesheets from loading, then there's nothing wrong with it.
    ie: if your site really is in the webroot of your hosting account, then it's perfectly fine.

    But, yes, if it ails you, then you can remove the slash by editing your configure.php file.
    .

    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
    May 2009
    Posts
    413
    Plugin Contributions
    0

    Default Re: Extra Forward Slash Before Links...

    Quote Originally Posted by DrByte View Post
    Well ... if it's not preventing your stylesheets from loading, then there's nothing wrong with it.
    ie: if your site really is in the webroot of your hosting account, then it's perfectly fine.

    But, yes, if it ails you, then you can remove the slash by editing your configure.php file.
    What would you do?

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Extra Forward Slash Before Links...

    If it's not causing any actual problems, then I'd just leave it.

    If it's bothering you, I'm guessing you've got a preceding / in this line unnecessarily:
    Code:
      define('DIR_WS_INCLUDES', 'includes/');
    .

    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.

  5. #5
    Join Date
    May 2009
    Posts
    413
    Plugin Contributions
    0

    Default Re: Extra Forward Slash Before Links...

    Hi Dr. B,

    Thanks for the reply.

    I looked in both the configure.php files and they both looked like this:
    Code:
    define('DIR_WS_INCLUDES', 'includes/');
    So that seemed to be ok. Do you know of anything else that could cause this?

    I know you have already said that if it was you then you would just leave it, but I'll quite happily admit I'm a little pedantic about these sorts of things lol

    I was thinking about another thing you said: "if your site really is in the webroot of your hosting account" - I'm on a dedicated server (although not yet live) could this be affecting anything?

    Thanks.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Extra Forward Slash Before Links...

    No, being a dedicated server or not doesn't affect how it reads and uses the data from the config files.
    .

    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.

 

 

Similar Threads

  1. Google Analytics adds extra slash
    By susb8383 in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 23 Feb 2012, 03:02 PM
  2. I need a tutorial on the forward slash.
    By joejoejoe in forum Installing on a Linux/Unix Server
    Replies: 11
    Last Post: 10 Dec 2011, 05:12 PM
  3. extra forward slash in url
    By urbanfarmer in forum General Questions
    Replies: 3
    Last Post: 16 Oct 2009, 03:50 PM
  4. Extra slash and spade in html
    By pixelpadre in forum General Questions
    Replies: 12
    Last Post: 14 Jun 2007, 09:01 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR