Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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>
like image 589
bingjie2680 Avatar asked Sep 21 '11 17:09

bingjie2680


1 Answers

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.

like image 107
ceejayoz Avatar answered Sep 21 '22 01:09

ceejayoz