Problems, need help? Have a tip or advice? Post it here.
11 posts Page 1 of 2
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
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
Hi @tmo :)

As it happens, I committed a fix to precisely this very problem just two days back - https://github.com/CouchCMS/CouchCMS/co ... 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?
One site has suddenly come up with too many redirects for me.
Replaced the header.php and got the http 500 error.
Reinstated my original header.php file.

Is there a straightforward solution, or do I have to reinstall Couch and replace all files. Is there not an easier way of resolving this?

Why has it occurred in the first place?
Is this going to happen to other sites?

Feedback would be appreciated.
Thx
PixelAce wrote: Why has it occurred in the first place?

I hope there's some hint in server's logs. Care to check it and, possibly, post here?
active topics, google
Free support is never free.. Donate!
@PixelAce, adding to what @trendoman asked -

which version of Couch is the site running on? Is caching turned on in couch/config ?
Also, did you happen to make any recent changes to the site.

Please let us know.
Thanks KK, no recent changes. V 1.4.7
I had already solved it by turning cache off in config. Will delete the old cache files and reset the system and turn cache back on.
Is there anything else I can do?

Thx
Tony
11 posts Page 1 of 2

Who is online

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

Users browsing this forum: No registered users and 6 guests