Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2012
    Posts
    50
    Plugin Contributions
    0

    Default Questions about my custom .htaccess file

    V1.5.5e

    On the last few versions of our shop (pre the 1.5.5e release) we had a .htaccess file when we moved from HTTP to HTTPS. There are loads of references to the HTTP address still out in the wild so the .htaccess file was helpful. I have included it now on the new version and I was wondering if I would need anything else within the file that would be helpful. Currently it is

    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

    Options -Indexes


    Thanks

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

    Default Re: .htaccess file on new update.

    Helpful is a little vague.

    If it were desirable/necessary to force all addresses to use or not use www. as a prefix more could be done/added. If wanted to block an ip address or range, that could be done, there are items that could be added to force certain features/options. Even the rewrite code provided could be done a different way (host should be able to confirm if the "best" way was chosen based on their setup of the server).

    All that possibly sarcastically said, it is important that even though such a rewrite was used, that ZC should handle the navigation to the next location in the same way. Ie. All links should be https: if you are going to use that in your htaccess file.

    This article describes how to accomplish that: https://www.zen-cart.com/content.php...alled-zen-cart the end of section three has some useful information specifically related to all pages being served securely.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jan 2012
    Posts
    50
    Plugin Contributions
    0

    Default Re: .htaccess file on new update.

    Thanks for that.

    Actually the reference states:

    /**
    * Enter the domain for your Admin URL. If you have SSL, enter the correct https address in the HTTP_SERVER setting, instead of just an http address.
    */
    define('HTTP_SERVER', 'https://spbwshop.co.uk');
    /**
    * Note about HTTPS_SERVER:
    * There is no longer an HTTPS_SERVER setting for the Admin. Instead, put your SSL URL in the HTTP_SERVER setting above.
    */
    The other config file looks as it should.

    One quibble might be should it show or not show the "www" part.

    Anyway, I am glad you pointed that out as, with further investigation, I find that the old test site is being referenced in both the config files - I still have the old test folder on the server. I was going to delete it now that I am live but I guess I will have to make sure that it is not mentioned elsewhere.

    define('DIR_WS_CATALOG', '/test/');
    define('DIR_WS_HTTPS_CATALOG', '/test/');
    Apart from the config files, would there be any other place where the old test folder would be mentioned?

    Thanks.

  4. #4
    Join Date
    Jan 2012
    Posts
    50
    Plugin Contributions
    0

    Default Re: .htaccess file on new update.

    I ran out of editing time for the post LOL.

    There is a third line:

    define('DIR_FS_CATALOG', '/home/spbwshop/public_html/test/');
    [/QUOTE]

    I will have a look tomorrow when my brain is awake.

    Thanks.

  5. #5
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: .htaccess file on new update.

    The guidance discussed about the admin side is different than what is needed for the catalog side. So I'm not sure I follow the rebuttal about the reference, but now it seems like you are looking for instruction about moving an installation from either one server to another or from one folder to another?

    To a different folder: https://www.zen-cart.com/content.php...that-directory

    To a different server: https://www.zen-cart.com/content.php...fferent-server

    Suggest doing one or the other, then working to perform the other, but not necessarily both at the same time without first understanding what needs to be done and why...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: .htaccess file on new update.

    Quote Originally Posted by spbw View Post

    Anyway, I am glad you pointed that out as, with further investigation, I find that the old test site is being referenced in both the config files - I still have the old test folder on the server. I was going to delete it now that I am live but I guess I will have to make sure that it is not mentioned elsewhere.



    Apart from the config files, would there be any other place where the old test folder would be mentioned?

    Thanks.
    If all of the suggested ZC coding methods are used, the only place that anything specific about the site should be identified would be the includes/configure.php and admin/includes/configure.php files. All other content and references should be based off of the information generated from the information that "grows" from them. But there is always the possibility that a direct reference was added to support display of an image or some link within the database. Identification of that requires a little "searching".
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Jan 2012
    Posts
    50
    Plugin Contributions
    0

    Default Re: .htaccess file on new update.

    I am not sure how you got "rebuttal" - I was giving details for anyone else who might be in this situation.

    It was a new install on a test folder, which was then linked to the existing database from the old site.

    I amended the three references per config file to show '/' instead of '/test/'.
    I renamed the test folder and tried the site again.
    Everything seems to be working.
    I can now delete the test folder

    Thanks for the support.

 

 

Similar Threads

  1. v138a questions about firebug and PHP file.
    By fanisme in forum General Questions
    Replies: 3
    Last Post: 22 Mar 2013, 10:47 AM
  2. htaccess file in the main directory (custom question)
    By eurorage in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 17 Feb 2011, 05:54 PM
  3. Questions About .htaccess files
    By LordGemz in forum General Questions
    Replies: 1
    Last Post: 20 Feb 2010, 10:14 AM

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