Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Mar 2009
    Posts
    88
    Plugin Contributions
    0

    Default change /index.php?main_page=index to just /

    On my home page, when you click the logo or the home page button on my menu, instead of just my site (www.mysite.com) it says mysite.com/index.php?main_page=index. How can I get rid of the index.php?main_page=index?

  2. #2
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: change /index.php?main_page=index to just /

    What's the problem with it being there?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: change /index.php?main_page=index to just /

    you would need to choose one of the SEO url modules available in the plugins section ( Link in Header )
    Zen cart PCI compliant Hosting

  4. #4
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: change /index.php?main_page=index to just /

    So, not necessarily if the only link to modify was the "homepage" link at the top of the browser. It could possibly be hard coded, but then any parameters that exist wouldn't be carried over. It could be that at least the main_page parameter could be omitted with proper generation of the uri using zen_href_link. It could be that the current template has incorrectly implemented the link. On a ZC 1.5.4 site that has had little modification (none to the tpl_header file) the home link goes directly to the root of the store without all the extra information.

    So in that regards, I'd have to ask what is different about this template than the template_default version of the equivalent file(s).

    If they choose to go the path of a uri rewriter, so be it, but doubtful it would fix the issue. May actually cause more aggrivation assuming the template is incorrectly coded.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: change /index.php?main_page=index to just /

    Quote Originally Posted by hflsales View Post
    On my home page, when you click the logo or the home page button on my menu, instead of just my site (www.mysite.com) it says mysite.com/index.php?main_page=index. How can I get rid of the index.php?main_page=index?
    First, what version of Zen Cart? And what template have you installed?
    .

    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
    Mar 2009
    Posts
    88
    Plugin Contributions
    0

    Default Re: change /index.php?main_page=index to just /

    Quote Originally Posted by DrByte View Post
    First, what version of Zen Cart? And what template have you installed?
    I have the newest version installed 1.5.4. The template is from zen4me called Hope. I have 2 other zencarts & when you click on the logo on the home page, it goes to mysite.com with nothing else. I guess it is the template because I turned on the classic template and it works as it should. I was just hoping there was an easy fix.

  7. #7
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: change /index.php?main_page=index to just /

    Quote Originally Posted by hflsales View Post
    I have the newest version installed 1.5.4. The template is from zen4me called Hope. I have 2 other zencarts & when you click on the logo on the home page, it goes to mysite.com with nothing else. I guess it is the template because I turned on the classic template and it works as it should. I was just hoping there was an easy fix.
    I would suggest looking at the template file: includes/templates/YOUR_TEMPLATE/common/tpl_header.php as compared to includes/templates/template_default/common/tpl_header.php.

    It seems that the default method of the logo link is to build it directly from base path for the site instead of by creation with zen_href_link...

    That is/typically is the file that has that information; however, there is no requirement for it to be there. Would generally be a good location to start though...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Mar 2009
    Posts
    88
    Plugin Contributions
    0

    Default Re: change /index.php?main_page=index to just /

    Quote Originally Posted by mc12345678 View Post
    I would suggest looking at the template file: includes/templates/YOUR_TEMPLATE/common/tpl_header.php as compared to includes/templates/template_default/common/tpl_header.php.

    It seems that the default method of the logo link is to build it directly from base path for the site instead of by creation with zen_href_link...

    That is/typically is the file that has that information; however, there is no requirement for it to be there. Would generally be a good location to start though...
    I looked at both files. They are completely different but I have no idea what to change. I guess I am stuck with it. Thanks for the help.

  9. #9
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: change /index.php?main_page=index to just /

    Quote Originally Posted by hflsales View Post
    I looked at both files. They are completely different but I have no idea what to change. I guess I am stuck with it. Thanks for the help.
    Only if choose to be.

    Post the contents (surrounded by CODE tags) of the file in the vicinity of where your logo link is created.

    The default version uses:
    Code:
    HTTP_SERVER . DIR_WS_CATALOG
    As the prefix/uri for the <a href= portion.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #10
    Join Date
    Mar 2009
    Posts
    88
    Plugin Contributions
    0

    Default Re: change /index.php?main_page=index to just /

    I added the module Ultimate URL's and it fixed it!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. How to change amout font size in /index.php?main_page=index&cPath=33
    By oavs in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 29 Jan 2014, 10:00 AM
  2. How to add banner to index.php?main_page=index&cPath=0 ?
    By Alexiss in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 31 Oct 2011, 04:55 PM
  3. change /index.php?main_page=index to just / with ceon uri?
    By new2u in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 29 Jan 2010, 02:06 AM
  4. Replies: 0
    Last Post: 26 Oct 2007, 12:55 AM
  5. Change the index.php?main_page=index and where it links to
    By tqualizer_man in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 25 Nov 2006, 01:41 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