Azure web.config重写规则,无法正常工作

时间:2016-11-01 21:54:31

标签: php azure iis url-rewriting

我是全新的天蓝色网络应用程序和iis url重写。我一直在寻找解决方案几个小时而没有运气

这个想法是有这个重写规则(在php linux服务器中就像是跟着:)。

RewriteRule ^telefono-de-([A-Za-z0-9_-\s\.\-]+) /informacion/index.php?keyword=$1 [NC]

RewriteRule ^v2/telefono-de-([A-Za-z0-9_-\s\.\-]+) /v2/index.php?keyword=$1 [NC]

但我无法在天蓝色中复制相同的东西。

这是我到目前为止没有成功的原因:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true"/>
<staticContent>
  <remove fileExtension=".svg" />
  <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
  <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
  <mimeMap fileExtension=".woff2" mimeType="application/font-woff" />
  <clientCache httpExpires="Sun, 29 Mar 2020 00:00:00 GMT" cacheControlMode="UseExpires" />
</staticContent>
<httpProtocol>
  <customHeaders>
    <add name="Strict-Transport-Security" value="max-age=31536000; includeSubDomains"/>
    <add name="Access-Control-Allow-Origin" value="*" />
    <add name="Access-Control-Allow-Headers" value="X-Requested-With,Content-Type" />
    <add name="Access-Control-Allow-Methods" value="POST,GET,OPTIONS,DELETE,PUT,PATCH" />
  </customHeaders>
</httpProtocol>
<rewrite>
  <rules>
    <rule name="algo" stopProcessing="true">
      <match url="^telefono-de-([A-Za-z0-9_-\s\.\-]+)" ignoreCase="false" />
      <action type="Rewrite" url="/informacion/index.php?keyword={R:1}" appendQueryString="true" />
    </rule>
  </rules>
</rewrite>
  </system.webServer>
</configuration>

它引发了一个错误:

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

请专业的天蓝色老兄,无论你在哪里,给我一个暗示我做错了什么!

0 个答案:

没有答案