views:

26

answers:

0

I have an installation of CodeIgniter. Basically, my directory structure looks like this:

| webroot
|- ci_apps
|-- application1
|-- application2
| ci_system
| index.php
| testing.php

Right now, I can only load one application, which is defined in index.php. What I would like to do is be able to rename index.php to application1.php and application2.php. Now here's the problem:

I want to be able to go to http://website.com/application1 without typing in .php.

How can I accomplish this with IIS URL Rewrite? My web.config file looks like this:

            <rule name="ci_rule_01" stopProcessing="true">
                <match url="(index.php|robots.txt|sitemap.xml|extras|info.php|favicon.ico|delorie.html|testing.php)" />
            </rule>
            <rule name="ci_rule_02">
                <match url="(.*)" />
                <action type="Rewrite" url="index.php/{r:1}" appendQueryString="false" />
            </rule>

That works when I use index.php (it hides index.php). But how would I alter this to work with a file like application1.php? I can't seem to get it working properly. I want http://website.com/ to use index.php (yet still hide it), and I want http://website.com/application1 to load application1.php.