HTTP错误404.0 - 在IIS中找不到Yii PHP

时间:2014-03-26 05:01:14

标签: php iis yii

我在IIS 7.0中托管了YII框架php应用程序。我可以查看默认页面,但是当我尝试访问其他页面时,我收到错误:

  

HTTP错误404.0 - 未找到。您正在寻找的资源已经存在   删除,更改名称或暂时不可用。

我知道运行时路径无效但我无法找到解决方案。

1 个答案:

答案 0 :(得分:0)

            1) Download Url Rewriting Extension from:

http://www.iis.net/downloads/microsoft/url-rewrite

            2)Install It then goto IIS Manager-> click on your site-> In Feature View there will be a Url writng icon double click it-> Browse your .htaccess to enable your rules.

        3) if you have no .htaccess file create it and paste the following code in it...


         RewriteEngine on

            # if a directory or a file exists, use it directly
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d

            # otherwise forward it to index.php
            RewriteRule . index.php
    I hope this will work for......