• I have a WordPress site running on IIS 7 with the Rewrite functionality installed.

    In the WordPress Permalink settings I change to /%category%/%postname% and everything works except child pages. Well, and Archive links, but I suspect that’s a separate issue.

    If I do a global $wp_rewrite; $wp_rewrite->flush_rules(); in functions.php, as I’ve read can help, it will fix child pages, but break posts.

    If I save the Permalink settings again, it switches back.

    Here’s the rewrite rule I’m using.

    <rewrite>
      <rules>
        <rule name="WordPress Rule" stopProcessing="true">
          <match url=".*" />
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
          </conditions>
          <action type="Rewrite" url="index.php?page_id={R:0}" />
        </rule>
      </rules>
    </rewrite>

    Any advice? Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Permalink child pages or posts, not both’ is closed to new replies.