I was recently asked by a client to fix a strange issue on their site. One of their pages was suffering from an infinite redirect loop when users weren’t logged in. Since the page worked fine for logged in users and the site was a membership site, it led me to think that the problem might lay with the membership plugin. In this case, it was the widely used service AccessAlly.

The Usual Suspects

The first thing you want to do when you have an infinite loop problem on a specific page in WordPress is check the page’s settings. There’s the chance that some sort of redirection plugin enables back-end users to set redirect rules directly on posts and pages (for example: the Content Expiration & Redirect plugin).

If the page itself doesn’t have any redirect rules in place, the next place to check is a general purpose redirect plugin like Redirection. These contain lists of active redirects and one of them could be incorrectly configured. The same applies for redirection modules in your hosting service. WP Engine has a Redirects tab that offers the same options.

The last place to check is usually the .htaccess file. You’d need FTP access to your site’s directory to view/edit this file and also have a bit more technical expertise given that messing around with it could cripple your site. Ideally, you’d want a support specialist to let you know if there are any rules in there that may be causing certain pages to redirect incorrectly.

No Unnecessary Rules

AccessAlly is pretty smart in how it handles visitor permissions to the site but the thing to be aware of is that you should not include any redirect rules that you don’t need. This means that you shouldn’t have empty rules in your configuration either. This will lead AccessAlly to think that you want blank redirects for users that aren’t logged in.

DO NOT leave empty redirect rules.

DO NOT leave empty redirect rules.

By only setting up the Conditional Redirects that you actually need, your pages will load just fine and your visitors will remain happy and unconfused!

 

If you have any questions, let me know in the comments. If you’re having trouble¬†with other AccessAlly or general WordPress issues, send me an email and I’ll gladly help you out.