Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2008
    Posts
    4
    Plugin Contributions
    0

    Default How to Get Rid of a 302 Redirect

    Hi! This is my first post so, I hope I picked the right category to post in.

    I've downloaded and installed ZC and customized it to have the same look and feel as the site it is being integrated into. Everything has gone well until last night when after placing the recommended .htaccess files in folders having spider.txt or index.html, I then added some products to a category and went to Admin->Configuration->Website Maintenance and set "Down for Maintenance" = FALSE.

    (I have not yet renamed the admin folder)

    My problem is that when I try to view my store from outside the admin console by directly typing the URL, I keep getting a 302 redirect from the store area to the main URL of the site.

    I'd really appreciate any advice on how to resolve this issue. The basic scenario is described as follows:


    I enter the URL http://www.brobinsoncorporation/biz/
    and get the following 302 redirect back to http://www.brobinsoncorporation.com:



    #1 Server Response: http://www.brobinsoncorporation.com/biz/index.php
    HTTP Status Code: HTTP/1.1 302 Moved Temporarily
    Date: Sun, 13 Jul 2008 01:08:33 GMT
    Server: Apache/1.3.41 (Unix) mod_log_bytes/1.2 mod_bwlimited/1.4 mod_auth_passthrough/1.8 FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.8b
    X-Powered-By: PHP/5.2.5
    Location: http://www.brobinsoncorporation.com
    Connection: close
    Content-Type: text/html
    Redirect Target: http://www.brobinsoncorporation.com

    #2 Server Response: http://www.brobinsoncorporation.com
    HTTP Status Code: HTTP/1.1 200 OK
    ETag: "9970031-1957-48711626"
    Content-Length: 6487
    Content-Type: text/html
    Last-Modified: Sun, 06 Jul 2008 18:59:50 GMT


    I then enter http://www.brobinsoncorporation/biz/index.php and get the same 302 redirect.

    Here is a snippet from http://www.brobinsoncorporation/biz/index.php



    // $Id: index.php 1111 2005-04-05 01:51:19Z drbyte $
    //

    // send to domain root
    session_write_close();
    header('Location: ' . 'http://' . $_SERVER['HTTP_HOST']);
    exit();
    ?>




    Here is a snippet from http://www.brobinsoncorporation/biz/.../configure.php




    /*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. ***********/
    /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/

    // Define the webserver and path parameters
    // HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
    // HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
    define('HTTP_SERVER', 'http://brobinsoncorporation.com');
    define('HTTPS_SERVER', 'https://brobinsoncorporation.com');

    // 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', '/biz/');
    define('DIR_WS_HTTPS_CATALOG', '/biz/');

    define('DIR_WS_IMAGES', 'images/');
    define('DIR_WS_INCLUDES', 'includes/');
    define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
    define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
    define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
    define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
    define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
    define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

    define('DIR_WS_PHPBB', '/');




    Here is a snippet from http://www.brobinsoncorporation/biz/.../configure.php




    /*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. ***********/
    /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/

    // Define the webserver and path parameters
    // Main webserver: eg-http://www.your_domain.com -
    // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
    // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
    // HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.your_domain.com
    // HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.your_domain.com
    /*
    * URLs for your site will be built via:
    * HTTP_SERVER plus DIR_WS_ADMIN or
    * HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or
    * HTTP_SERVER plus DIR_WS_CATALOG or
    * HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG
    * ...depending on your system configuration settings
    *
    * If you desire your *entire* admin to be SSL-protected, make sure you use a "https:" URL for all 4 of the following:
    */
    define('HTTP_SERVER', 'http://brobinsoncorporation.com');
    define('HTTPS_SERVER', 'https://brobinsoncorporation.com');
    define('HTTP_CATALOG_SERVER', 'http://brobinsoncorporation.com');
    define('HTTPS_CATALOG_SERVER', 'https://brobinsoncorporation.com');

    // Use secure webserver for catalog module and/or admin areas?
    define('ENABLE_SSL_CATALOG', 'false');
    define('ENABLE_SSL_ADMIN', '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_ADMIN', '/biz/admin/');
    define('DIR_WS_CATALOG', '/biz/');
    define('DIR_WS_HTTPS_ADMIN', '/biz/admin/');
    define('DIR_WS_HTTPS_CATALOG', '/biz/');

    define('DIR_WS_IMAGES', 'images/');
    define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
    define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
    define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
    define('DIR_WS_INCLUDES', 'includes/');
    define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
    define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
    define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
    define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
    define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
    define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');

    // * DIR_FS_* = Filesystem directories (local/physical)
    //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
    define('DIR_FS_ADMIN', '/home/brobin05/public_html/biz/admin/');
    define('DIR_FS_CATALOG', '/home/brobin05/public_html/biz/');


    Any ideas about what I am doing wrong?


    Regards,
    Frank0

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: How to Get Rid of a 302 Redirect

    Quote Originally Posted by Frank0 View Post
    Here is a snippet from http://www.brobinsoncorporation/biz/index.php
    [/B]


    // $Id: index.php 1111 2005-04-05 01:51:19Z drbyte $
    //

    // send to domain root
    session_write_close();
    header('Location: ' . 'http://' . $_SERVER['HTTP_HOST']);
    exit();
    ?>
    It seems like you've replaced the main index.php file by mistake.
    .

    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
    Jul 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: How to Get Rid of a 302 Redirect

    Quote Originally Posted by DrByte View Post
    It seems like you've replaced the main index.php file by mistake.
    Thanks.

    Is the solution as simple as copying one of the other index.php files such as:


    to



    Regards,
    Frank0

  4. #4
    Join Date
    Jul 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: How to Get Rid of a 302 Redirect

    I went ahead and tried copying the index.php file from the admin folder to the folder one level higher. When I enter the URL, all I get is a blank page.

    Do I now need to reinstall to a different path and copy the index.php? Or, is there some other way? I sure don't want to make things worse.


    Regards,
    Frank0

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: How to Get Rid of a 302 Redirect

    1. Did you make a backup of your site before you started editing and adding files? You should.
    Same with installing addons. Always make a backup first. Better yet, make your changes in a test copy of your site, not the live one.

    2. You can obtain the original Zen Cart files for your version of Zen Cart in the master download area on SourceForge. You can get the correct original index.php file from there: https://www.zen-cart.com/tutorials/i...hp?article=323
    .

    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
    Jul 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: How to Get Rid of a 302 Redirect

    Quote Originally Posted by DrByte View Post
    1. Did you make a backup of your site before you started editing and adding files? You should.
    Same with installing addons. Always make a backup first. Better yet, make your changes in a test copy of your site, not the live one.
    I had not yet made a backup but will do so ASAP.

    I did install a new instance of ZC in a different path and copied the index.php. I seem to be in good shape now. Thank you very much for your assistance.


    Regards,
    Frank0

 

 

Similar Threads

  1. v154 Redirect 302 picked up
    By Annie_zaz in forum General Questions
    Replies: 4
    Last Post: 28 Jan 2016, 06:59 AM
  2. v139h redirect 302
    By lruskauff in forum General Questions
    Replies: 0
    Last Post: 2 Jan 2014, 06:04 AM
  3. 302 redirect with languages vs search engines
    By xordox in forum Bug Reports
    Replies: 1
    Last Post: 1 Nov 2008, 01:34 PM
  4. 302 Redirect error with worldpay mod
    By crazycucumber in forum General Questions
    Replies: 1
    Last Post: 23 May 2007, 01:27 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