Remove index.php in permalink structure on IIS server

In permalinks(dashboard) section index.php added.

Current Post Name:
Expected Post Name:

How can i remove index.php?

Note: I am using windows server

2 s

According to the documentation here:

I assume you have already selected Post Name in your permalink structure:

Then include this code in web.config

    <rule name="Main Rule" stopProcessing="true">
        <match url=".*" />
        <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
        <action type="Rewrite" url="index.php" />

Leave a Comment