Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
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.

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:
• Location in 301 Header:
(yes, I've triple checked this with numerous problematic URLs - including www vs non-www and http:// vs https://)

• 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 ... 0cb54d4907) to help with SEO.
• 16 days ago, I did a search and replace in the DB for -> 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 ^(.*)${REQUEST_URI} [L,R=301]

[2] K_SITE_URL is on
Code: Select all
define( 'K_SITE_URL', '' );

[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
Hi @tmo :)

As it happens, I committed a fix to precisely this very problem just two days back - ... f801dab859

If you could use the updated file, I think that would fix this problem for good.

Hope it helps.
Amazing! Thank you!
You are always welcome :)
@KK I was having the too many redirects issue, so I changed to the latest header.php file. Now, I'm getting an Error 500.
I ended up installing the latest Couch and copying my local files back over. That seemed to fix the issue. Is there anything I need to do to keep this from happening again?
6 posts Page 1 of 1

Who is online

In total there are 5 users online :: 1 registered, 0 hidden and 4 guests
(based on users active over the past 5 minutes)

Users browsing this forum: Google [Bot] and 4 guests