【发布时间】:2011-10-07 21:13:36
【问题描述】:
我的 httpd.conf
<VirtualHost *:80>
...
DocumentRoot /home/www/static
...
<Directory /home/www/static>
Order Allow,Deny
Allow from all
</Directory>
<Location "/foo">
SetHandler None
</Location>
</virtualhost>
我在 /home/www/static/foo/helloworld.txt 有一个文件。如果我去http://localhost/foo/helloworld.txt 我会看到那个文件。
现在,出于某种不相关的原因,我想更改网址。上面的 url 应该什么都不返回,而 http://localhost/bar/helloworld.txt 应该返回文件。我想实现这一点,而无需更改目录结构中的任何内容。
这是怎么做到的?
【问题讨论】: