For WordPress’s permalink feature to work, request parameters need to be sent to the script. On Apache servers, this can be done via .htaccess files using
mod_rewrite.
When running WordPress on IIS, we need to do the same operation with web.config files. Otherwise, the permalink feature will not work.
If you upload the following code snippet to the root directory as web.config, the permalink feature will
become active. If you already have a web.config file, you only need to edit the relevant sections.
<?xml version=“1.0” encoding=“UTF-8”?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name=“WordPress
Rule” stopProcessing=“true”>
<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?page_id={R:0}” />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Leave a Comment
* Your comment will be published after approval.
Comments
0No comments yet. Be the first to comment!