仅允许特定 ip 访问站点并允许所有访问特定文件
我的 httpd.conf 中有这个配置,
<Directory />
AllowOverride none
Order Deny,Allow
Deny from all
Allow from 66.220.144.0/20 69.63.176.0/20
</Directory>
<Files crossdomain.xml>
Order deny,allow
Allow from all
</Files>
我想要实现的是允许 facebook 访问 Web 应用程序并拒绝其他人,但允许每个人访问文件 crossdomain.xml。不幸的是,上述配置不起作用。上述配置的结果是 crossdomain.xml 文件仍然被阻止。谁能帮我完成这个配置吗?
谢谢!
I have this configuration in my httpd.conf
<Directory />
AllowOverride none
Order Deny,Allow
Deny from all
Allow from 66.220.144.0/20 69.63.176.0/20
</Directory>
<Files crossdomain.xml>
Order deny,allow
Allow from all
</Files>
What I am trying to achive is allow facebook to access the web application and deny everyone else but allow everybody to access the file crossdomain.xml. Unfortunately the above configuration is not working. The result of the above config is the crossdomain.xml file is still being blocked. Can anyone help me on this configuration?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
每 http://httpd.apache.org/docs/2.0/mod/ core.html#目录:
因此,您的
标记应使用文档根文件夹的完整路径,而不是相对于网站的路径。Per http://httpd.apache.org/docs/2.0/mod/core.html#directory:
So your
<Directory>
tag should be using the full path to the document root folder, not the path relative to the website.