开发者

why apache server redicect /doc to usr/share/doc

开发者 https://www.devze.com 2023-04-06 17:18 出处:网络
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 n

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号