• Hi!

    I come from Joomla, where I handle URLs and SEF URLs with sh404SEF. That makes it easy to find, add and delete redirects.

    I made a change in the permalink structure of a site I am building. Everything works ok, but for one particular post category, where all blog posts lead to 404’s. I can see in the Rewrite Rule inspector, that a rule is setup:

    Rule
    nlp/([^/]+)/?$

    Rewrite
    index.php?nlp=$matches[1]

    Source
    nlp

    I have found the rule in the db in the wp_options table. But deleting / altering the db results in a rebuild when the rules are flushed. I tried make new .htaccess, redo writing access, save permalinks, flush rules but no help.

    My question is: How do I remove the rule permanently and where does this rule originate from? Where does WP determine the “source”, can this be edited in backend? Can WP suck in rules from .htaccess and keep them in the db?

    I hope you can spare a few minutes clearing this up.

    • This topic was modified 8 years, 4 months ago by prokops.
    • This topic was modified 8 years, 4 months ago by prokops.
Viewing 1 replies (of 1 total)
  • I’m going to throw an idea out there… Do you have a plugin that handles redirects? If so, it may be repopulating the database by reading the contents of the .htaccess file. The same plugin may be repopulating the .htaccess file based on what it has stored in the database. If you find such a plugin installed, try disabling the plugin, remove the database records that the plugin may have created, and remove the rule(s) from the .htaccess file. I could be wrong, but I don’t believe WP stores redirect data in the database unless there is a plugin involved (or a set of functions in the theme).

Viewing 1 replies (of 1 total)
  • The topic ‘How to delete rewrite rule?’ is closed to new replies.