2

I am experimenting to develop websites on windows azure platform. I want to remove index.php from URL in my codeigniter project.

I found 1 solution here:

Solution

But, I don't know where is web.config file in azure management panel?

Can anyone tell me exact location ? Can I change that file from their website?

Thanks.

Community
  • 1
  • 1
RNK
  • 5,582
  • 11
  • 65
  • 133

1 Answers1

5

This web.config should work with codeigniter.

Just create a file called web.config and upload it to your wwwroot folder on Azure (The folder where your index.php is)

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Rule" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="false" />
                        <conditions>
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                            <add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" />
                        </conditions>
                        <action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

Let me know how you get on!

Thanks

  • 1
    Just a side note, this also works on Zend Framework both 1 and 2, it also works on laravel, this setting should work on most php framework available – Bryan P Sep 17 '14 at 01:03