I’ve been working on this for a few hours now. I am trying to place Codeigniter framework into a Windows Azure website. PHP works great however I can’t seem to get this rewrite rule to work right. This is my web.config file.
<?xml version="1.0"?>
<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>
When I upload the file to the Windows Azure website and run the page with the index.php it returns with a HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request At this point I am not sure what to do, do I need to do something with Windows Azure? I am coming from an Apache background, Windows IIS is new to me. Any information is helpful to me thank you.
Based on the information you provided as I am coming from an Apache background, Windows IIS is new to me, I am sure that your problem is related with IIS configuration to support URL Rewrite. (IF you have already installed URLRewrite and configured in Azure VM let me know and I will delete this answer)
By default in Windows Azure, IIS does not have URLRewrite module installed so it can not perform any of the URL ReWrite setting configured and will return 500 error.
Have you enabled RDP access to your Azure VM so you can remote into and that look for possible exception logged in Application event log? If you RDP to your Azure VM and look for Application event log you will see an error explaining URL Rewrite modules is not available.
First you need to create a Start up Task to install URLRewrite module in your Azure. To learn more about Windows Azure Startup task visit this link.
Here is a link on how to enabled URL Rewrite in Windows Azure. (if this is your error, I can write details info on how to get URLRewrite working on Windows Azure)