0

Ok, this is embarrassing. I created an infinite loop on every page using the following rewrite rule:

add_rewrite_rule('.', 'home/', 'top');

I have no idea how to undo it, as every page, including settings pages, now give me a 500 error. Any idea how to fix it?

2
  • try to rename the file .htaccess on the root of the website
    – mmm
    Oct 19, 2017 at 10:44
  • Oh wow, the .htaccess file contains the rules themselves! Thanks for pointing me in that direction! Oct 19, 2017 at 10:46

1 Answer 1

0

You can remove the offending rewrite rule manually from the .htaccess file, in the web site's root.

Thanks, "mmm"!

1
  • 1
    Most of rewrite rules are not stored in .htaccess, but you probably can use that to knock out pretty permalinks from working altogether in such case to get to the site. To force WP to regenerate rules you can also erase rewrite_rules option in options table in database.
    – Rarst
    Oct 19, 2017 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.