title: Codeigniter 2 on IIS with web.config file
body: <p>I have a codeigniter app working fine locally with WAMP. However, I am having trouble getting it to work on an IIS server. Please note that I do not want to enable query strings.</p>
  
  <p>Here is what I currently have in my web.config file:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration&gt;
      &lt;system.webServer&gt;
          &lt;rewrite&gt;
              &lt;rules&gt;
                  &lt;rule name="Clean URL" stopProcessing="true"&gt;
                      &lt;match url="^(.*)$" /&gt;
                      &lt;conditions&gt;
                          &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&gt;
                          &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /&gt;
                      &lt;/conditions&gt;
                      &lt;action type="Rewrite" url="index.php/{R:1}" appendQueryString="false" /&gt;
                  &lt;/rule&gt;
              &lt;/rules&gt;
          &lt;/rewrite&gt;
      &lt;/system.webServer&gt;
  &lt;/configuration&gt;  
  </code></pre>
  
  <p>This causes the main page to load properly: www.website.com/policies</p>
  
  <p>However, when I click on an item to go to: www.website.com/policies/policy/view/31</p>
  
  <p>The proper page is not displayed. The main page continues to be displayed.</p>
  
  <p>The controller is Policy and the function is view(). The Codeigniter files are in a policies/ folder on the server.</p>
  
  <p>I think the problem may be with my web.config file. The Config file's $config['base_url'] is dynamically calculated and is the correct one. The Config file's $config['index_page'] is blank. What do you think is causing this problem?</p>
  
  <p>Thank you all for your help.</p>