5

enter image description here

Above picture shows my problem, Go through many of the blogs, Godaddy support, stack overflow questions. FACING THIS PROBLEM FROM ONE MONTH, So at last Stack community to help.

There is no web.config file in my root folder but .htaccess file whom change does'nt effect permalinks. what should i do for creating this sort of permalink structure www.example.com/category/postname as my current permalink structure is http://www.example.com/?page_id=104 details of hosting server Godaddy with windows hosting enviornment and iis 7 server. Godaddy don'nt have any knowledge about this in there help center.

jonnyjava.net
  • 912
  • 7
  • 23
Zahid Khan
  • 1,250
  • 3
  • 15
  • 31
  • check out [codex](http://codex.wordpress.org/Using_Permalinks) and search for iis – gwillie Sep 27 '13 at 05:02
  • @gwillie i've read this but did'nt found solution. iis 7 provide url rewrite and looks for web.config. So waiting for some one to provide exact web.config for mentioned permalink structure. Thanks – Zahid Khan Sep 27 '13 at 05:14
  • 1
    there's a link on the page i provided which goes to [iis website](http://www.iis.net/learn/extensions/url-rewrite-module/enabling-pretty-permalinks-in-wordpress). what @Uzair pasted is from that page – gwillie Sep 27 '13 at 05:37

1 Answers1

25

You need to create a web.config file in the root directory of your WordPress installation (the same directory as the .htaccess file), and add the following code in web.config:

<?xml version="1.0" encoding="UTF-8"?>
<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 should enable pretty permalinks in WordPress with URL Rewrite running on IIS.

Uzair Sajid
  • 2,135
  • 2
  • 21
  • 28