【发布时间】:2011-11-22 03:50:59
【问题描述】:
我在 ubuntu10.4 服务器的 /var/www 下的 .htaccess 文件中有重写规则,如下所示,当 url 显示为 http://127.0.0.1/doc/view 时,网页显示“未找到请求的 URL /doc/view在这台服务器上”,然后我检查了 apach 日志,它记录了“文件不存在:/usr/share/doc/view”,所以显然 apache 将 /doc/view 重定向到 /usr/share/doc/view。我不知道这是怎么回事,有人可以帮忙吗?感谢您的帮助。
Options +FollowSymLinks
IndexIgnore */*
<IfModule mod_rewrite.c>
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
</IfModule>
【问题讨论】:
标签: apache mod-rewrite ubuntu