As far as I know, if you want to hosted the Codeigniter in the IIS, you need to add some special url rewrite rule to let your application work well.
I suggest you could install the url rewrite extension for the IIS firstly.
Then I suggest you could try to add below rule into the web.config.
<system.webServer>
<rewrite>
<rules>
<rule name="Index">
<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/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>