• I have an asp site – https://abc213 with wordpress installed as a subdirectory – https://abc123/blog. The main blog page displays fine but when trying to go to any links I get:

    HTTP Error 404.0 – Not Found
    The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

    In the root directory’s web.config i have the following:

    <rewrite>
    	<rules>
    	<clear />
    		<rule name="wordpress" patternSyntax="Wildcard">
    			<match url="*" />
    			<conditions>
     	                       <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
     	                       <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    			</conditions>
    				<action type="Rewrite" url="index.php" />
    		</rule>
    	</rules>
    </rewrite>

    in the sub-directory i have the following:

    <rewrite>
          	<rules>
     	<clear />
    		<rule name="blog" stopProcessing="true">
    			<match url=".*" />
    			<conditions>
          		                  <add input="{HTTP_HOST}" pattern="^abc123" />
          		                  <add input="{PATH_INFO}" pattern="^/" negate="true" />
    			</conditions>
    				<action type="Rewrite" url="\blog\{R:0}" />
    		</rule>
    
    		<rule name="blog-wp" patternSyntax="Wildcard">
    			<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" />
    		</rule>
    	</rules>
        </rewrite>
  • The topic ‘Permalinks with sub-directory in IIS’ is closed to new replies.