2014-03-26 75 views
0

我在IIS 7.0中托管了YII框架php应用程序。我能看见的默认页面,但是当我尝试访问我收到错误的其他页面:HTTP错误404.0 - 在Yii的IIS中找不到PHP

HTTP Error 404.0 - Not Found.The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

我知道运行时路径是无效的,但我无法找到一个解决方案。

回答

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...... 
相关问题