【发布时间】:2014-03-26 05:01:14
【问题描述】:
我在 IIS 7.0 中托管了 YII 框架 php 应用程序。我可以查看默认页面,但是当我尝试访问其他页面时出现错误:
HTTP 错误 404.0 - 未找到。您正在寻找的资源已被 已删除、更改名称或暂时不可用。
我知道运行时路径无效,但我找不到解决方案。
【问题讨论】:
我在 IIS 7.0 中托管了 YII 框架 php 应用程序。我可以查看默认页面,但是当我尝试访问其他页面时出现错误:
HTTP 错误 404.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......
【讨论】: