我一直在为此工作了几个小时。我正在尝试将Codeigniter框架放入Windows Azure网站。 PHP的伟大作品,但我似乎无法得到这个重写规则工作正确。这是我的web.config
文件。Windows Azure重写规则导致HTTP错误500
<?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>
当我将文件上传到Windows Azure的网站并运行它用HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request
返回此时index.php
我不知道该怎么做网页,做我需要做一些使用Windows Azure?我来自Apache背景,Windows IIS对我来说是新的。任何信息对我都有帮助,谢谢。
'web.config'看起来不像PHP或Codeigniter;我认为它是Azure服务器系统的一部分,可能是某种IIS配置文件。 –
你有没有尝试过他们在这里描述的内容:http://www.request-response.com/blog/PermaLink,guid,efe64356-5657-4e26-b145-8abed9feb6aa.aspx看起来像有一种方法可以得到一个更具描述性的错误网络。配置文件。微软网站上的另一个类似页面:http://blogs.msdn.com/b/rickandy/archive/2011/11/23/debugging-http-500-internal-server-error-with-windows-azure- sdk.aspx –
这似乎是一个奇怪的重写。它看起来像将'/ foo'映射到'/ index.php/foo',这可能不存在。你确定你不想要像'index.php?path = {R:1}'这样的东西吗? – smarx