Complicated URL Rewrite. Rewriting index.php, yet wanting to rewrite other.php to load without extension

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 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 name="ci_rule_02">
                <match url="(.*)" />
                <action type="Rewrite" url="index.php/{r:1}" appendQueryString="false" />

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 to use index.php (yet still hide it), and I want to load application1.php.


have you taken a look at this?

your rewrite rule would then just need to exclude *.php from your url.

Need Your Help

Unexplained Red X's (collisions?) with Dual-Port BRAM in Xilinx ISim

vhdl xilinx modelsim

I've read up on this quite a bit and I can't figure out why I would have Red X's (Collisions?) with a simple Dual-Port BRAM IP core.

Remove part of the Request.Form

c# request.form

In a C# MVC3 solution I'm passing the request.form as a string to a webservice (I understand it would be much better to break it down and populate a model but it's compromised with old code and mai...