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.

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

1 Comment

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.