SouthernCaliforniaGarrison Posted February 28, 2023 Posted February 28, 2023 Hello, We are seeing an issue with the links provided in emails containing redirects that ultimately produce an error of "imperialgunners.com redirected you too many times." when opened. Here is an example of one of these links:https://imperialgunners.com/forums/index.php?app=core&module=system&controller=redirect&url=https://imperialgunners.com/forums/index.php?/messenger/10346/%26do=findComment%26comment=11764&key=6d66362e736d1102e13d241d8c9390cbf3fa44d27bfa45923404cbec8d7c933b&email=1&type=notification_new_private_message I do have an HTTP to SSL redirect in htaccess for the forums, but it didn't use to cause this problem. Please let me know what I should look into. Thanks!
Marc Posted February 28, 2023 Posted February 28, 2023 You would need to remove any redirect you have there. Our software will redirect http to https anyway.
SouthernCaliforniaGarrison Posted March 1, 2023 Author Posted March 1, 2023 Hi. The HTTP->HTTPS apparently was removed a while back. Can you think of anything in the software that would generate this redirection? It is currently breaking automated password resets as well as causing other issues with emails. Thanks!
Randy Calvert Posted March 1, 2023 Posted March 1, 2023 (edited) The software itself will use whatever URL is specified in your conf_global.php file. If it has https in it, https will be used. I would suggest you look at your .htaccess file and see if you have anything in it that is doing a redirect. You might also need to look at any 3rd party resources you have installed to see if any of them are introducing any sort of unintended redirects that are not in the base software itself or interfering with the base software. Edited March 1, 2023 by Randy Calvert
SouthernCaliforniaGarrison Posted March 1, 2023 Author Posted March 1, 2023 I will double check but, as far as I can tell, the problem is only in the links in the emails. The site is working fine otherwise. I can't think of anything on the system that would add a redirection to a URL in an email generated by IP.Board.
Randy Calvert Posted March 1, 2023 Posted March 1, 2023 Make sure you have that original HTTP -> HTTPS redirect removed in htaccess. You don't want to do it there as it CAN cause the problem you described in the right circumstances. (Especially if you have things like HSTS enabled already.) Good luck! 🙂
SouthernCaliforniaGarrison Posted March 1, 2023 Author Posted March 1, 2023 Hi. This is the extent of our .htaccess file: RewriteEngine on Redirect 302 /index.html https://imperialgunners.com/forums Redirect 302 /index.htm https://imperialgunners.com/forums Redirect 302 /index.php https://imperialgunners.com/forums RewriteRule "^/images_old/$" "/images_new/" [PT] # php -- BEGIN cPanel-generated handler, do not edit # Set the “ea-php80” package as the default “PHP” programming language. <IfModule mime_module> AddHandler application/x-httpd-ea-php80___lsphp .php .php8 .phtml </IfModule> # php -- END cPanel-generated handler, do not edit
SouthernCaliforniaGarrison Posted March 1, 2023 Author Posted March 1, 2023 Just to add a comparison between to the sites I manage. Here's an example of the email link back to a new PM on the affected system:https://imperialgunners.com/forums/index.php?app=core&module=system&controller=redirect&url=https://imperialgunners.com/forums/index.php?/messenger/10287/%26do=findComment%26comment=11672&key=4e92cfb69eef43d19472de2a3a6882e51ab1f19d1e8fca6582c0f0e7eb5c0364&email=1&type=notification_new_private_message And here's one from a healthy system:http://www.southerncaliforniagarrison.com/forums/index.php?/messenger/23310/&do=findComment&comment=53250 Do you have any ideas why the app, module, controller, redirectURL, and other various items are in the first link and not the second one? Did we accidently enable an advanced or debugging feature without realizing it?
Marc Posted March 1, 2023 Posted March 1, 2023 As mentioned, please remove any custom redirects and test again first of all.
SouthernCaliforniaGarrison Posted March 2, 2023 Author Posted March 2, 2023 Hi. All redirects from HTTP to HTTPS have been removed. The only redirects still in play are for moving queries from /index.html to our forums subdirectory. The problem is still persisting. After looking around in the admin panel, I noticed that the links are not in friendly URL format. I tried resetting these but that did not change anything.
Jim M Posted March 2, 2023 Posted March 2, 2023 20 minutes ago, SouthernCaliforniaGarrison said: Hi. All redirects from HTTP to HTTPS have been removed. The only redirects still in play are for moving queries from /index.html to our forums subdirectory. The problem is still persisting. After looking around in the admin panel, I noticed that the links are not in friendly URL format. I tried resetting these but that did not change anything. You will want to remove all redirects 🙂 . While I understand what you're saying here and that these should only be limited to index.html, the reality is we need to remove all external factors which may be playing on the software at present so we can investigate this further. You can re-instate that after our investigation concludes.
SouthernCaliforniaGarrison Posted March 2, 2023 Author Posted March 2, 2023 Redirects have been removed and replaced with a static index page.
SouthernCaliforniaGarrison Posted March 2, 2023 Author Posted March 2, 2023 I've tested out the links in the previous emails, and a couple of new ones, and we're no longer seeing the error, so that at least gets that aspect of the site working again. Thank you! I would still like to figure out why the true links aren't being sent in the emails, though. For example, the email contains this link:https://imperialgunners.com/forums/index.php?app=core&module=system&controller=redirect&url=https://imperialgunners.com/forums/index.php?/topic/2038-request-for-igc-deployment/%26do=findComment%26comment=61385&key=7d1e9bd543ceebbe549fa0625bbf561baf0430c34f33849d6850fc9e4e2220bf&email=1&type=notification_new_comment But becomes this in the browser after clicking on it: https://imperialgunners.com/forums/index.php?/topic/2038-request-for-igc-deployment/page/33/#comment-61385
Solution Stuart Silvester Posted March 2, 2023 Solution Posted March 2, 2023 The redirect in this case is for email click tracking. You can toggle that via AdminCP > System > Email Settings > 'Log Statistics'.
SouthernCaliforniaGarrison Posted March 4, 2023 Author Posted March 4, 2023 Thanks! I've disabled that and now waiting for some emails to come in for verification.
Recommended Posts