Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Mar 2007
    Posts
    115
    Plugin Contributions
    0

    Default 301 redirect problem -- error in my .htaccess -- How do I fix?

    I tried doing a 301 redirect to help my pagerank, but when I did that, I wouldn't be able to login to my admin panel or the site! I'm not sure what the problem is..

  2. #2
    Join Date
    Mar 2007
    Posts
    115
    Plugin Contributions
    0

    Default Re: 301 redirect error

    I was trying to redirect myshop.com to www.myshop.com in my .htaccess file

    after this, I wasn't able to login to the admin panel or as a customer. Then I turned it off, and the problem went away. What gives?

  3. #3
    Join Date
    Mar 2007
    Posts
    115
    Plugin Contributions
    0

    Default Re: 301 redirect problem -- error in my .htaccess -- How do I fix?

    any ideas?

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

    Default Re: 301 redirect problem -- error in my .htaccess -- How do I fix?

    Perhaps you need to study more about writing .htaccess rules to ensure what you're using is correct.

    I suspect you're getting no feedback due to lack of detail about what you've done and why.
    .

    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
    Mar 2007
    Posts
    115
    Plugin Contributions
    0

    Default Re: 301 redirect problem -- error in my .htaccess -- How do I fix?

    Well I used this code in my .htaccess file:

    Code:
    Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^domain.com [nc]
    rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]
    from here:
    http://www.webconfs.com/how-to-redirect-a-webpage.php

    I tried that, and the redirection worked. But I couldn't login to the admin panel or as a customer on the site after the redirection was added.

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

    Default Re: 301 redirect problem -- error in my .htaccess -- How do I fix?

    Interestingly, almost the same code posted here seems to work fine:
    http://www.zen-cart.com/forum/showth...248#post447248
    Code:
    ## the following adds the www if it's missing:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^the_name_of_your_domain.com$ [NC]
    RewriteRule ^(.*)$ http://www.the_name_of_your_domain.com/$1 [R=301,L]
    Have you tried ensuring that the case-sensitivity isn't an issue?

    Also, what errors were appearing in your apache error_log after making the change? Usually the error messages will give you clues to what's wrong.

    Also, what's in your configure.php files, namely the first half which talks about the HTTP_xxxxxxx and DIR_WS_xxxxxx settings?
    .

    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.

  7. #7
    Join Date
    Mar 2007
    Posts
    115
    Plugin Contributions
    0

    Default Re: 301 redirect problem -- error in my .htaccess -- How do I fix?

    in admin/includes/configure.php:
    Code:
      define('HTTP_SERVER', 'http://www.wishgiving.com');
      define('HTTPS_SERVER', 'https://www.wishgiving.com');
      define('HTTP_CATALOG_SERVER', 'http://www.wishgiving.com');
      define('HTTPS_CATALOG_SERVER', 'https://www.wishgiving.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', '/shop/admin/');
      define('DIR_WS_CATALOG', '/shop/');
      define('DIR_WS_HTTPS_ADMIN', '/shop/admin/');
      define('DIR_WS_HTTPS_CATALOG', '/shop/');
    
      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/');
    in /includes/configure.php:

    Code:
    define('HTTP_SERVER', 'http://www.wishgiving.com');
      define('HTTPS_SERVER', 'https://www.wishgiving.com');
    
      // 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', '/shop/');
      define('DIR_WS_HTTPS_CATALOG', '/shop/');
    
      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', '/');
    
    // * 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_CATALOG', '/home/wishgivi/public_html/shop/');
    
      define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
      define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
      define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');

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

    Default Re: 301 redirect problem -- error in my .htaccess -- How do I fix?

    okay ... how about the server error log?
    .

    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.

  9. #9
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: 301 redirect problem -- error in my .htaccess -- How do I fix?

    I see some serious problems here.

    In your config files, you cannot have one that uses 'HTTPS = true' and the other config file using 'HTTPS = false'.

    http://www.wishgiving.com/shop/admin/ <<< where are the 'index.php' and '.htaccess' files?

    The 'shop/admin/htacces.php' file is a serious security breach. You should use it (for whatever it is there for) then remove it.

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

    Default Re: 301 redirect problem -- error in my .htaccess -- How do I fix?

    Hey rob,
    actually you can run ssl true in the cart and ssl false in the admin,

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Can't login after adding a 301 redirect in .htaccess
    By eutopia in forum Basic Configuration
    Replies: 0
    Last Post: 11 Oct 2011, 02:27 AM
  2. Ultimate SEO Module + htaccess 301 redirect issue
    By justinanderson007 in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 31 Aug 2010, 04:12 PM
  3. Replies: 1
    Last Post: 3 May 2009, 05:16 AM
  4. 301 redirect in htaccess not working
    By FrenchFrog in forum General Questions
    Replies: 10
    Last Post: 24 Aug 2007, 12:36 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