bin*_*680 4 apache ubuntu mod-rewrite
我在我的ubuntu10.4服务器下的/ var/www下的.htaccess文件中有重写ruls,如下所示,当网址显示为http://127.0.0.1/doc/view时,网页显示"请求的URL/doc/view在此服务器上找不到",然后我检查apach日志,它记录"文件不存在:/ usr/share/doc/view",所以apachently apache将/ doc/view重定向到/ usr/share /文档/视图.我不知道这里发生了什么,有人可以帮忙吗?感谢帮助.
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>
Run Code Online (Sandbox Code Playgroud)
Apache在许多发行版上的默认配置使得您可以去http://localhost/doc/阅读Apache文档.你可以在你编辑了这一点,httpd.conf或者apache2.conf如果你需要使用的文件/doc为您自己的网址.
| 归档时间: |
|
| 查看次数: |
2828 次 |
| 最近记录: |