Windows Azure and web.config doesn't run with

2019-09-17 20:11发布

I've got to create a small application with CodeIgniter, and I try to use the web site module from Windows Azure.

I converted my .htaccess from this link. My .htaccess look like at this:

Options -Indexes
RewriteEngine on
RewriteRule ^(.*)$ index.php/$1 [L]

The result look like at this:

<rule name="rule 1y" stopProcessing="true">
    <match url="^(.*)$"  />
    <action type="Rewrite" url="/index.php/{R:1}"  />
</rule>

But, when I go in my web site, I've got this error:

The page cannot be displayed because an internal server error has occurred.

1条回答
做个烂人
2楼-- · 2019-09-17 20:38

Try adding the following lines to your web.config file:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <httpErrors errorMode="Detailed" />
    </system.webServer>
    <system.web>
            <customErrors mode="Off" />
    </system.web>
</configuration>    

PS: Do not repeat system.webServer and system.web sections in your web.config. Add the configurations to the existing one.

查看更多
登录 后发表回答