Unfortunately, I don't have any example links at this moment because I've fixed them all, so please no one spend too much time troubleshooting this. I am mostly hoping that someone has encountered this before, or can provide suggestions or things to check next time it pops up.
Problem
Seemingly random clonable single pages seem to have a redirect loop. Two different clonables have this (both videos and products). 10 confirmed instances reported over a few days. When I do a ping to see what the loop is, they are two identical links. For example:
• Requested URL: https://www.site.com/video/page.html
• Location in 301 Header: https://www.site.com/video/page.html
• (yes, I've triple checked this with numerous problematic URLs - including www vs non-www and http:// vs https://)
Solution
• Saving the page in /couch admin panel solves the issue. Of course, it doesn't solve what is causing the issue, which is what I need help with.
More Info
• Site has been running on CouchCMS for ~4 years now
• We updated from Couch v1 to v2 AND switched to SSL in December 2016
• 16 days ago, I did added some expires caching in htaccess (similar to https://gist.github.com/tayvano/fae0a93 ... 0cb54d4907) to help with SEO.
• 16 days ago, I did a search and replace in the DB for http://www.site.com -> https://www.site.com as there were some leftover links. I also did a search and replace for a commonly mis-capitalized product. Didn't encounter any issues during process or during spotcheck after.
• We received first report of "too many redirects" 5 days ago. As our team of use the site heavily, I would be surprised if these issues existed before then & certainly not 16 days ago without a single report.
htaccess & config info
• We have ~30 specific RewriteRule's for old site links -> new site links or "shortcut" links
• We have the three lines at the end of htaccess to try to enforce https://www. [1]
• We have 1. K_SITE_URL[2] turned on in config.php since Dec '16, as we were encountering issues during the transition to SSL
• Pretty URLs and Caching is turned on since we launched years ago [3]
• We do not have any other caching or stuff. We are on your stereotypical shared hosting, no Cloudflare or anything.
If anyone has encountered this issue before, please share with me anything that you have done to troubleshoot and/or fix it. I'm at a loss of what to try. It seems to be a caching thing as saving the page in couch "fixes" the redirect loop for that page. But I cannot for the life of me figure out why that could be happening.
Many thanks in advanced. Loving Couch v2 and thrilled to see KK is still chugging away and providing the most phenomenal support ever. <3
[1] htaccess to try to enforce https://www
[2] K_SITE_URL is on
[3] Pretty URLs + Caching is on
Problem
Seemingly random clonable single pages seem to have a redirect loop. Two different clonables have this (both videos and products). 10 confirmed instances reported over a few days. When I do a ping to see what the loop is, they are two identical links. For example:
• Requested URL: https://www.site.com/video/page.html
• Location in 301 Header: https://www.site.com/video/page.html
• (yes, I've triple checked this with numerous problematic URLs - including www vs non-www and http:// vs https://)
Solution
• Saving the page in /couch admin panel solves the issue. Of course, it doesn't solve what is causing the issue, which is what I need help with.
More Info
• Site has been running on CouchCMS for ~4 years now
• We updated from Couch v1 to v2 AND switched to SSL in December 2016
• 16 days ago, I did added some expires caching in htaccess (similar to https://gist.github.com/tayvano/fae0a93 ... 0cb54d4907) to help with SEO.
• 16 days ago, I did a search and replace in the DB for http://www.site.com -> https://www.site.com as there were some leftover links. I also did a search and replace for a commonly mis-capitalized product. Didn't encounter any issues during process or during spotcheck after.
• We received first report of "too many redirects" 5 days ago. As our team of use the site heavily, I would be surprised if these issues existed before then & certainly not 16 days ago without a single report.
htaccess & config info
• We have ~30 specific RewriteRule's for old site links -> new site links or "shortcut" links
• We have the three lines at the end of htaccess to try to enforce https://www. [1]
• We have 1. K_SITE_URL[2] turned on in config.php since Dec '16, as we were encountering issues during the transition to SSL
• Pretty URLs and Caching is turned on since we launched years ago [3]
• We do not have any other caching or stuff. We are on your stereotypical shared hosting, no Cloudflare or anything.
If anyone has encountered this issue before, please share with me anything that you have done to troubleshoot and/or fix it. I'm at a loss of what to try. It seems to be a caching thing as saving the page in couch "fixes" the redirect loop for that page. But I cannot for the life of me figure out why that could be happening.
Many thanks in advanced. Loving Couch v2 and thrilled to see KK is still chugging away and providing the most phenomenal support ever. <3
[1] htaccess to try to enforce https://www
- Code: Select all
RewriteCond %{HTTP_HOST} !^www\. [OR]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.site.com%{REQUEST_URI} [L,R=301]
[2] K_SITE_URL is on
- Code: Select all
define( 'K_SITE_URL', 'https://www.site.com/' );
[3] Pretty URLs + Caching is on
- Code: Select all
// 8.
define( 'K_PRETTY_URLS', 1);
// 9.
define( 'K_USE_CACHE', 1 );
// 10.
define( 'K_CACHE_PURGE_INTERVAL', 24 );
// 11.
define( 'K_MAX_CACHE_AGE', 7 * 24 ); // Default is 7 days