Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Feb 2013
    Location
    Green Valley, Arizona, United States
    Posts
    21
    Plugin Contributions
    0

    cart error .htaccess and Admin Area Problem

    I'm using ZC 1.5.0. new install from my hosting company cPanel. I have SSL and all that.

    I wanted to make the following urls all automatically forward to https://www.sanguinarius.org/store/ :

    http://www.sanguinarius.org/store/
    http://sanguinarius.org/store/
    https:/sanguinarius.org/store/

    I contacted my hosting company and they told me to use a .htaccess file with this in it:

    Code:
    RewriteEngine On
        RewriteCond %{SERVER_PORT} 80
        RewriteRule ^(.*)$ https://www.sanguinarius.org/store/$1 [R=301,L]
    and upload it to my store directory. (That is so the rest of my website doesn't get forwarded to https://;blahblahblah.

    OK, fine. I did that. Then I went to edit a product and submit it to the database and I get the pink strip at the top that says:

    Error ERROR: The data you submitted was found to be empty. YOUR CHANGES HAVE *NOT* BEEN SAVED. You may have a problem with your browser or your internet connection.

    =====

    What did I do wrong and how do I make it right short of removing the .htaccess file and having people going to http://www.sanguinarius.org/store/ and it not being secure? Or do I remove the file and do something else that you ZC guys here know about but my webhost's tech support doesn't?
    Last edited by Sanguinarius; 15 Mar 2013 at 03:05 AM. Reason: trying to subscribe to this post but not finding it

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

    Default Re: .htaccess and Admin Area Problem

    What's so sensitive about your site that you need it to serve everything over SSL?

    To do it, it would be a whole lot simpler if you simply deleted that .htaccess change and merely set all the URLs in your configure.php files to point to https:// instead of a mix of http:// and https://
    .

    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
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: .htaccess and Admin Area Problem

    Quote Originally Posted by Sanguinarius View Post

    I contacted my hosting company and they told me ...
    I would cancel my hosting account IMMEDIATELY, and move the installation to a crowd that knows eCommerce and zencart in particular.

    The minute a host indicates that they have little idea about how important platforms and systems work should be a clear signal to go find one that knows what they are doing.
    20 years a Zencart User

  4. #4
    Join Date
    Feb 2013
    Location
    Green Valley, Arizona, United States
    Posts
    21
    Plugin Contributions
    0

    Default Re: .htaccess and Admin Area Problem

    Quote Originally Posted by schoolboy View Post
    I would cancel my hosting account IMMEDIATELY, and move the installation to a crowd that knows eCommerce and zencart in particular.

    The minute a host indicates that they have little idea about how important platforms and systems work should be a clear signal to go find one that knows what they are doing.
    I canceled my old host immediately and moverd to my current one BECAUSE they DID support Zen Cart. I've paid for a year: hosting, dedicated IP and SSL certificate and I can't afford to move at this point. I'm on a fixed income but hoping to eventualy break out of the cycle by becoming a webepreneur. :) Anyway, I like them. I think I just got a hold of one that was a dummy.

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

    Default Re: .htaccess and Admin Area Problem

    To secure your checkout pages with SSL, simply enabled it in your configure.php files. That way Zen Cart will intelligently use SSL on pages that need it, and not on pages that don't.

    FAQ explaining it: http://www.zen-cart.com/content.php?...alled-zen-cart
    .

    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
    Feb 2013
    Location
    Green Valley, Arizona, United States
    Posts
    21
    Plugin Contributions
    0

    help question Re: .htaccess and Admin Area Problem

    This is what I have in my catalog/includes/configure.php folder:

    Code:
    // Define the webserver and path parameters
      // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
      // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
      define('HTTP_SERVER', 'http://sanguinarius.org');
      define('HTTPS_SERVER', 'https://sanguinarius.org');
    
      // Use secure webserver for checkout procedure?
      define('ENABLE_SSL', 'false');
    
    // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
    // * DIR_WS_* = Webserver directories (virtual/URL)
      // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
      define('DIR_WS_CATALOG', '/store/');
      define('DIR_WS_HTTPS_CATALOG', '/store/');
    Shouldn't this following snippet of code be set to "true"? WOuld that alone solve my problem?:

    Code:
    // Use secure webserver for checkout procedure?
      define('ENABLE_SSL', 'false');
    This is what I have in my admin/includes/configure.php file:

    Code:
    /**
     * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN:
     * To do that, make sure you use a "https:" URL for BOTH the HTTP_SERVER and HTTPS_SERVER entries:
     */
      define('HTTP_SERVER', 'http://sanguinarius.org');
      define('HTTPS_SERVER', 'https://sanguinarius.org');
      define('HTTP_CATALOG_SERVER', 'http://sanguinarius.org');
      define('HTTPS_CATALOG_SERVER', 'https://sanguinarius.org');
    
      // secure webserver for admin?  Valid choices are 'true' or 'false' (including quotes).
      define('ENABLE_SSL_ADMIN', 'true');
    
      // secure webserver for storefront?  Valid choices are 'true' or 'false' (including quotes).
      define('ENABLE_SSL_CATALOG', 'true');

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

    Default Re: .htaccess and Admin Area Problem

    Two changes, highlighted and bolded in red:
    Quote Originally Posted by Sanguinarius View Post
    catalog/includes/configure.php:

    Code:
    // Define the webserver and path parameters
      // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
      // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
      define('HTTP_SERVER', 'http://sanguinarius.org');
      define('HTTPS_SERVER', 'https://sanguinarius.org');
    
      // Use secure webserver for checkout procedure?
      define('ENABLE_SSL', 'true');
    
    // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
    // * DIR_WS_* = Webserver directories (virtual/URL)
      // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
      define('DIR_WS_CATALOG', '/store/');
      define('DIR_WS_HTTPS_CATALOG', '/store/');

    This is what I have in my admin/includes/configure.php file:

    Code:
    /**
     * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN:
     * To do that, make sure you use a "https:" URL for BOTH the HTTP_SERVER and HTTPS_SERVER entries:
     */
      define('HTTP_SERVER', 'https://sanguinarius.org');
      define('HTTPS_SERVER', 'https://sanguinarius.org');
      define('HTTP_CATALOG_SERVER', 'http://sanguinarius.org');
      define('HTTPS_CATALOG_SERVER', 'https://sanguinarius.org');
    
      // secure webserver for admin?  Valid choices are 'true' or 'false' (including quotes).
      define('ENABLE_SSL_ADMIN', 'true');
    
      // secure webserver for storefront?  Valid choices are 'true' or 'false' (including quotes).
      define('ENABLE_SSL_CATALOG', 'true');
    .

    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
    Feb 2013
    Location
    Green Valley, Arizona, United States
    Posts
    21
    Plugin Contributions
    0

    Default Re: .htaccess and Admin Area Problem

    In the admin configure, won't this line of code (below) make my whole domain SSL?

    Code:
    define('HTTP_SERVER', 'https://sanguinarius.org');
    Do I need my whole domain to be secure? Is that something I should have enabled anyway or not? Does it make it safer from hackers?
    Last edited by Sanguinarius; 16 Mar 2013 at 03:47 AM.

  9. #9
    Join Date
    Feb 2013
    Location
    Green Valley, Arizona, United States
    Posts
    21
    Plugin Contributions
    0

    Default Re: .htaccess and Admin Area Problem

    Well, you're the Sensei, DrByte. It works, so I'm not going to question that. I can continue with my customizing and adding products. Thank you.

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

    Default Re: .htaccess and Admin Area Problem

    NOTE: You quoted your catalog AND admin configure.php files, and I told you to put the "s" in ONLY on the admin one. Not the other one. Heed that.
    .

    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. v150 Ultimate SEO .htaccess problem and broken Admin interface
    By erint29 in forum All Other Contributions/Addons
    Replies: 33
    Last Post: 27 Aug 2012, 06:56 PM
  2. Admin area and limiting by IP with HTAccess?
    By Profile90909 in forum General Questions
    Replies: 8
    Last Post: 10 Jun 2011, 01:24 PM
  3. Admin area not displaying stylesheet? (fasthosts & .htaccess fun I think...)
    By yelow in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 30 Dec 2008, 07:56 PM
  4. Cannot access admin area after .htaccess directory - gives me page not found
    By immersive in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 30 Oct 2008, 10:51 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