Search code examples
wordpresspermalinks

Wordpress Pretty Permalinks redirecting to home page on iis7


I have my WP site on iis7[Windows server 2008 R2];have explored a lot to find the right solution but nothing worked :(

http://cricketclips.net/late-overs-batting-flurry-from-luke-wright-pepsi-ipl-2013-kxip-vs-pw-match-29/

Added the following code to web.config in root

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

but still it didn't work

My Url are being rewrite but are redirected to homepage instead of single.php and other pages ( that is index.php instead of single.php)

have checked the server for "FCGI" and "URL rewrite module", both are installed.

Any help in this regard will be appreciated.


Solution

  • This link helped me make my permlinks to work!

    Just followed the steps

    1. Changed the permalink structure to

      http://example.com/index.php/%post_id%/%postname%/

    2. Checked the result and voila! it was working...

    3. Then changed the link back to

      http://example.com/%post_id%/%postname%/

    4. And happily ever after :)