Exciting News! Flipper Code is now WePlugins! Same commitment to excellence, brand new identity.

Enabling Permalinks for a WordPress Installation Using Web.config on an IIS Server

Sandeep Kumar Mishra
Sandeep Kumar Mishra
in Posts > Tech
February 14, 2013
5 minutes read
Enabling Permalinks for a WordPress Installation Using Web.config on an IIS Server

Having trouble with permalinks on an IIS Server? Unlike Apache servers where you can easily use an .htaccess file, IIS requires a different approach. Follow these steps to ensure your WordPress permalinks work properly on an IIS server.

Steps to Configure Permalinks on IIS Server

Step 1: Create a web.config File

First, navigate to the root folder of your WordPress installation. Check if a web.config file already exists. If not, create a new one.

Step 2: Add Rewrite Rules

Next, you need to add specific rewrite rules to the web.config file. Paste the following code into your web.config file:

<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>

This code ensures that all requests are redirected to index.php unless they are for existing files or directories.

Conclusion

And that’s it! With these simple steps, your permalinks should now work correctly on your IIS server. If you have any questions or run into issues, feel free to ask in the comments below. If you’re experiencing any issues with the configuration, feel free to reach out to us for assistance.

Access Premium WordPress Plugins

Sandeep Kumar Mishra

Sandeep Kumar Mishra

Sandeep Kumar Mishra writes about WordPress and Artificial Intelligence, offering tips and guides to help you master your website and stay updated with the latest tech trends.

Explore the latest in WordPress

Trying to stay on top of it all? Get the best tools, resources and inspiration sent to your inbox every Wednesday.