Pretty URL dont work on IIS after wordpress migrating

Pretty URL dont work on IIS after wordpress migrating. I cant access anything except home page. When I am changing in permalinks settings from Postname to plain I can access my posts, otherwise i get error 404.

I tried to create a web.config file with below code:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
      <system.webServer>
        <rewrite>
          <rules>
                <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>
      </system.webServer>
    </configuration>

but nothing works. Also tried that once with .htaccess file and once by removing it but still have no result.

I am running my website on IIS.. Do you think that installing apache could solve this problem? Or what else? Any feedback would be helpfull

Read more here: Pretty URL dont work on IIS after wordpress migrating

Leave a Reply

Your email address will not be published. Required fields are marked *