.htaccess file only works on Apache servers. WordPress users must use “Almost Pretty” URLs, for example, https://hoogeshdawoodarry.com/setup-wordpress-permalinks-iis/.

A piece of code that can be handy to Setup WordPress Permalinks IIS. Make sure you have the url rewrite module activated :)

web.config for WordPress Permalinks IIS

<?xml version="1.0" encoding="UTF-8"?>
<rule name="setup-wordpress-permalinks-iis" 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" />