Tuesday, November 25, 2014

WordPress redirect loop

If your blog is working fine when you include the "www" in the url, but you get a "This webpage has a riderect loop" message when you omit the "www" here's a quick and dirty solution for your problem.

Navigate to your blogs root directory, open wp-content/themes then go to your current themes folder, open the fuctions.php file and add this line remove_filter('template_redirect', 'redirect_canonical'); at the very end, right between } and ?>.

It should look something like this:

}
  remove_filter('template_redirect', 'redirect_canonical');
?>

And you're done!

No comments:

Post a Comment