【发布时间】:2011-10-10 11:05:02
【问题描述】:
我有一个目录,我只想在我的办公室内访问。我有这个工作,并阻止就好了。这是我的 apache conf 中的内容:
<Directory /var/www/html/live/protected>
Order deny,allow
allow from 1.1.1.1.1.1 # My office ip
deny from all
</Directory>
与其创建自定义 403 页面,我更愿意将这些人发送到 404 页面。在 Apache 中有没有一种方法可以有条件,如果它们不是来自我的办公室 IP,我可以将它们发送到我拥有的 404 页面?
谢谢
【问题讨论】:
标签: apache redirect http-status-code-403