Page 1 of 3 123 LastLast
Results 1 to 10 of 29
  1. #1
    Join Date
    May 2005
    Posts
    535
    Plugin Contributions
    0

    Default ERR_Too_Many_Redirects using Ceon URI Mapping

    I am getting this error rather a lot and I am try to find a solution. Out on the WWW many are saying this is an issue with Chrome, but I have had it occur with other browsers. It occurs when going to the shopping cart. It has occurred with customers checking out and going to Paypal

    Some have suggested it relates to .htaccess files.

    I have Ceon SEO mapping module and this obviously uses rewrite conditions. Could this be the problem?

    I have had a rewrite condition to rewrite my URL to HTTPS:// I suspect this could be more likely to cause the error.

    Do I need this rewrite condition to force my site to use HTTPS all the time..

    If my config files I have used

    define('HTTP_SERVER', 'https://www.mydomain.co.uk');
    define('HTTPS_SERVER', 'https://www.mydomain.co.uk');

    Hence my question about is it needed in the htaccess file.

    Hope some one can just advise on what is or is not needed to avoid this error.

    Thanks

    MikeyG

  2. #2
    Join Date
    May 2005
    Posts
    535
    Plugin Contributions
    0

    Default Re: ERR_Too_Many_Redirects

    Further testing - this is happening nearly everytime I go to checkout from the shopping cart and also when I go to confirm the order

    https://www.mydomain.co.uk/index.php...fecaction=null

    I have tried this with the https rewrites in the .htaccess file # out so they are not read/used but it is still occurring.

  3. #3
    Join Date
    Jul 2012
    Posts
    16,743
    Plugin Contributions
    17

    Default Re: ERR_Too_Many_Redirects

    Htaccess commands are themselves like a program. Their sequence is important/critical. It is possible that a form of a loop has been generated or that there really are too many redirects.

    The redirect in the htaccess to https is intended to address arriving at the site. The includes/configure.php settings are for navigation once at the site.

    You mentioned that HTTP_SERVER was set for https:, what about ENABLE_SSL? Further then, what version of ZC is this associated with? Depending on that setting, the version and some other modules (payment modules) it may be necessary to make a few other changes as well.

    What are the contents of your catalog's htaccess? Before pasting them, please select the # button in the message box to encapsulate the contents in CODE tags.

    Forgot to mention, obscure your admin directory.
    Last edited by mc12345678; 1 May 2017 at 01:22 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    May 2005
    Posts
    535
    Plugin Contributions
    0

    Default Re: ERR_Too_Many_Redirects

    mc12345678

    Thanks for the reply. To answer some of your questions.

    ENABLE_SSL =true in the config files

    Currently using 1.5.4 (going through dev for new version at moment)

    Just using Paypal express for checkout.

    .htaccess currently looks like this.

    Code:
     ## BEGIN CEON URI MAPPING REWRITE RULE
    
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
    RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
    # Now, rewrite any request to the wrong domain to use www.
    # [NC] is a case-insensitive match
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
    RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    
    # RewriteCond %{HTTP_HOST} ^mydomain\.co\.uk$ [OR]
    # RewriteCond %{HTTP_HOST} ^www\.mydomain\.co\.uk$
    # RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
    # RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    # RewriteRule ^(.*)$ "https\:\/\/www\.mydomain\.co\.uk\/$1" [R=301,L]
    
    
    # Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])
    # Don't rewrite any URIs for some, popular specific file format extensions,
    # which are not covered by main file extension condition above
    # Don't rewrite any URIs for some specific file format extensions,
    # which are not covered by main file extension condition above
    # Uncomment the following line to apply this condition! (Remove the # at the start of the next line)
    #RewriteCond %{REQUEST_URI} !\.(3gp|3g2|h261|h263|mj2|mjp2|mp4v|mpg4|m1v|m2v|m4u|f4v|m4v|3dml)$ [NC]
    # Don't rewrite admin directory
    # Don't rewrite editors directory
    # Don't rewrite sage directory
    # Don't rewrite cron directory
    # Don't rewrite twitter directory
    # Don't rewrite newsletters directory
    # Don't rewrite min directory
    # Don't rewrite catalogue directory
    # Don't rewrite blog directory
    # Don't rewrite feed directory
    # Don't rewrite bmz_cache directory
    # Don't rewrite logs directory
    # Handle all other URIs using Zen Cart (its index.php)
    RewriteCond %{REQUEST_URI} !\.[a-z]{2,5}$ [NC]
    RewriteCond %{REQUEST_URI} !\.(mp3|mp4|h264)$ [NC]
    RewriteCond %{REQUEST_URI} !^/myadmin [NC]
    RewriteCond %{REQUEST_URI} !^/editors/ [NC]
    RewriteCond %{REQUEST_URI} !^/sage/ [NC]
    RewriteCond %{REQUEST_URI} !^/cron/ [NC]
    RewriteCond %{REQUEST_URI} !^/twitter/ [NC]
    RewriteCond %{REQUEST_URI} !^/newsletters/ [NC]
    RewriteCond %{REQUEST_URI} !^/min/ [NC]
    RewriteCond %{REQUEST_URI} !^/catalogue/ [NC]
    RewriteCond %{REQUEST_URI} !^/blog/ [NC]
    RewriteCond %{REQUEST_URI} !^/feed/ [NC]
    RewriteCond %{REQUEST_URI} !^/bmz_cache/ [NC]
    RewriteCond %{REQUEST_URI} !^/logs/ [NC]
    RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
    RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteRule .* index.php [QSA,L]
    
    ## END CEON URI MAPPING REWRITE RULE
    Hope that helps you to be able to give a bit more of an accurate answer to what the issue might be.

    Thanks in advance for your help.

    MikeyG

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

    Default Re: ERR_Too_Many_Redirects

    I'm not familiar with how this module works but it looks like you also have code inserted by cPanel. You should separate out that part and change it to read:

    Code:
    RewriteEngine On
    
    RewriteCond %{HTTPS} off
    RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
    RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
    # Now, rewrite any request to the wrong domain to use www.
    # [NC] is a case-insensitive match
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
    RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    
    # RewriteCond %{HTTP_HOST} ^mydomain\.co\.uk$ [OR]
    # RewriteCond %{HTTP_HOST} ^www\.mydomain\.co\.uk$
    # RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
    # RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    # RewriteRule ^(.*)$ "https\:\/\/www\.mydomain\.co\.uk\/$1" [R=301,L]
    
    
     ## BEGIN CEON URI MAPPING REWRITE RULE
    
    ceon directives go here...
    As no mention made whether problem started before or after installing CEON module you should test to determine when problem occurs.

    If you remove everything from ## BEGIN CEON URI MAPPING REWRITE RULE and further, does the problem still exist? Using that as your starting point for troubleshooting will help to work out the problem. If the problem only occurs when the CEON directives are used then you should post in the CEON module thread for more specific help.

  6. #6
    Join Date
    May 2005
    Posts
    535
    Plugin Contributions
    0

    Default Re: ERR_Too_Many_Redirects

    Website Rob,

    Thank you for your reply.

    The CEON mapping has been installed since setting up the site. This issue seems to have only occurred recently. I had google telling users that the site was not secure, despite it running SSL.

    So the changes I made were to get the site to run using SSL all the time. At first I used the cpanel redirects to change all my urls to HTTPS://www.mydomain.co.uk

    This did not seeem to work and google was always pointing my site to http://www. So I then put the rewrite rule into the .htaccess file to change the url to https://www.

    I don't know for sure but I think it was at this point it started.

    I have the config file using https and google now seems to have my url on searches using https://

    If I remove this rewrite from the htaccess and just go back to the CEON will the site keep https and / or will google start to penalise my again and show messages that my site is not secure.


    Has anyone else had this issue?

    I try and make the site fit their rules and now I get them telling me I have too many redirects. I am certainly
    baffled by this whole Site optimisation when you do what they appear to me asking then something else gets in the way.

    Look forward to peoples thoughts on this.

    Many thanks

    MikeyG

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

    Default Re: ERR_Too_Many_Redirects

    If things were working fine until you added the redirect to use HTTPS then there is your problem.

    Suggest you edit public_html/.htaccess and remove everything.

    Then add the following:

    Code:
    #############################
    ##  General Settings
    
    Options  +SymLinksIfOwnerMatch -FollowSymlinks -Indexes
    
    RewriteEngine ON
    
    # Define the default Character Set for Browsers
    AddDefaultCharset utf-8
    
    # if an https URL is not used then redirect to use https
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
    
    # regardless of whether an https URL is used,
    # if a URL is used without www then redirect to an https URL that does use www
    RewriteCond %{HTTP_HOST} ^example.com [NC]
    RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
    
    
    #############################
    ##  BEGIN CEON URI MAPPING REWRITE RULE
    
    copy & paste the ceon directives here...
    Save and then see how things are working.

    Note that "example.com" should be changed to your Domain name.

    Also note, there is some confusion right now about this but for the moment,
    do NOT change this line to false in your config files:

    define('ENABLE_SSL', 'true');
    Last edited by Website Rob; 1 May 2017 at 10:50 PM.

  8. #8
    Join Date
    May 2005
    Posts
    535
    Plugin Contributions
    0

    Default Re: ERR_Too_Many_Redirects

    Website Rob

    I have changed my htaccess file at the start to include your first bit as above. I have then included the original stuff for CEON URL MAPPING.

    As soon as I get to the following url https//:http://www.my_site.co.uk/index.php?m...62a08e8d19997c

    I get the TOO_MANY_REDIRECTS error.

    I even made sure that browser cache was cleared before restarting the browser and login into my zencart site and going straight to the shopping basket and going to confirm the order. This is when the error comes up.

    Do I need the first bit you put to redirect to https:

    I still have the config file as indicated above with ENABLE_SSL set to true.

    How can I monitor how the site is opening that page and the server doing any redirects.

    Could the issue be with the template used? (tableau by numinix)

    I guess the big question is if I take out the https rewrite rules am I going to get back the site opening in http rather than https and the errors/message that google put up which is the site is not safe.

    Thank you once again with your suggestions.

    Best Regards

    MikeyG

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

    Default Re: ERR_Too_Many_Redirects

    Something tells me the CEON module is not installed correctly. I say that because the URL you provided for the checkout page has a zenid in it and that's not right.

    For the time being, since the two rewrite codes are conflicting, you should decide which is the more important rewrite and remove the other. Personally I don't see why modules like CEON are needed and I would uninstall it. That is your call though.

  10. #10
    Join Date
    May 2005
    Posts
    535
    Plugin Contributions
    0

    Default Re: ERR_Too_Many_Redirects

    WebSite Rob,

    Thank you again for your help and ideas.

    I have tried turning off Ceon URL mapping and deleting the rewrite rules in the .htaccess file at the root of the site. But I am still getting an error when I try to check out and I get the ERR_TOO_MANY_REDIRECTS message. (I have not physically delete the CEON_URL_MAPPING code but I have turned it off in admin.)

    This is happening at the point where I go from the shopping cart page to the checkout page. If I hit the back button on the browser and then the checkout button again I get the next page. If I go back to the shopping cart. change something in the cart and then checkout button again I get the ERR_TOO_MANY_REDIRECTS back again.

    Any ideas what might cause this?

    As always really appreciate any ideas that might help me try to get to the bottom of this.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v154 not Respecting Context of a Link to a Category/Product page using CEON URI MAPPING
    By lruskauff in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 11 Jun 2015, 07:17 AM
  2. 151 Paypal express 404 error using CEON URI Mapping
    By Jewm in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 29 Jul 2014, 01:36 PM
  3. v139d Ceon uri mapping, how to generate uri mapping for bulk bulk-imported products?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 8 Jan 2013, 06:52 AM
  4. Ceon URI Mapping v4
    By conor in forum All Other Contributions/Addons
    Replies: 110
    Last Post: 14 Aug 2011, 02:51 PM
  5. Media Manager clips broken -- using CEON URI Mapping
    By gradyscott in forum All Other Contributions/Addons
    Replies: 15
    Last Post: 17 Jun 2011, 12:56 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