小编use*_*350的帖子

Azure中的Mod_rewrite

我写的很简单.htaccess并在Windows Azure网站上测试它,但是mod_rewrite在那里没有用.为什么?我如何重新配置​​Azure?

AddDefaultCharset utf-8上的RewriteEngine

RewriteCond%{REQUEST_FILENAME}!-f RewriteCond%{REQUEST_FILENAME}!-d

RewriteRule ^ test.html $ test.php?%{QUERY_STRING} [L]

.htaccess azure

9
推荐指数
1
解决办法
1万
查看次数

为什么在向Azure中的Web.config添加重写规则时会获得500?

我正在Azure上部署站点,我正在尝试为该站点编写重写规则.

我有以下代码,它的工作原理:

<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Sendy all" stopProcessing="true">
          <match url="^(.+?)$" ignoreCase="true" />
             <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
             </conditions>
          <action type="Rewrite" url="index.php" appendQueryString="true" />
        </rule>
        <rule name="Sendy all" stopProcessing="true">
          <match url="^api/(.+?)$" ignoreCase="true" />
            <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
              <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            </conditions>
          <action type="Rewrite" url="index.php" appendQueryString="true" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)

但是当我在rules标签中添加以下代码时,我收到错误消息The page cannot be displayed because an internal server error has occurred.为什么?

<rule name="Sendy all" stopProcessing="true">
  <match …
Run Code Online (Sandbox Code Playgroud)

php .htaccess rewrite web-config azure

7
推荐指数
1
解决办法
789
查看次数

标签 统计

.htaccess ×2

azure ×2

php ×1

rewrite ×1

web-config ×1