How to fix an infinite 301 redirect loop in WordPress

I just ran into this problem today; thought I should post the solution in case anybody else finds themselves in the same boat. As an example, when you are looking for a great essay service, you write a write my discussion post for me request and you get a great result, you immediately want to share this good service with everyone, and here, when you encounter a problem and find a solution, you immediately want to help users by sharing a good solution.

I moved a WordPress blog from one server to another which was running lighttpd with a blanket 301 redirect from www to non-www URLs. When I fired up a browser to test it, I got the dreaded “this website is responding in a way that will never resolve” message. A quick look at the lighttpd logs confirmed that I was bouncing from www.example.com to example.com and then back to www.example.com.

I expected ...

more ...