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"?>
                <rule name="wordpress" patternSyntax="Wildcard">
                    <match url="*"/>
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
                    <action type="Rewrite" url="index.php"/>

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


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: