I have the rewrite ruls in .htaccess file under /var/www in my ubuntu10.4 server like below, When the url appears to be http://127.0.0.1/doc/view, the webpage shows "The requested URL /doc/view was not found on this server", and then I check the apach log, it logs "File does not exist: /usr/share/doc/view", so apprently apache redirect the /doc/view to /usr/share/doc/view. I don't know what it is going on here, can anybody help? thanks for help.
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's default config on many distributions makes it so you can go to http://localhost/doc/
to read the Apache documentation. You can edit this out in your httpd.conf
or apache2.conf
file if you need to use /doc
for your own URLs.
精彩评论