Php Azure webconfig上的Codeigniter

Php Azure webconfig上的Codeigniter,php,.htaccess,codeigniter,Php,.htaccess,Codeigniter,我将基于CodeIgniter 2.x的旧网站部署到Azure web应用程序上 我更改了基本url,但除了主网页,其他网页不工作,它说不存在 我发现我们必须有web.config而不是.htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^system.* RewriteRule ^(.*)$ /index.php?/

我将基于CodeIgniter 2.x的旧网站部署到Azure web应用程序上

我更改了基本url,但除了主网页,其他网页不工作,它说不存在

我发现我们必须有web.config而不是.htaccess

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

重新启动发动机
重写基/
重写COND%{REQUEST_URI}^系统*
重写规则^(.*)$/index.php?/$1[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)$index.php?/$1[L]
ErrorDocument 404/index.php

这是我从旧网站获得的代码。htaccess而不是这个,我应该在Azure的web.config中写些什么?

你可能想试试这个
web.config
模板

你试过把重写规则移出
吗?@Goose哦,我还没试过,让我试试看,移动重写规则行吗?