[英]Apache 2 block url such as example.com/?admin
Please can you tell me in Apache2 how I can restrict a url to my IP address when the url is generated as a script. 请您在Apache2中告诉我,当URL作为脚本生成时,如何将URL限制为我的IP地址。 For example: 例如:
example.com/?admin
I have tried Location Match but no joy: 我尝试过位置匹配,但没有任何乐趣:
<LocationMatch /?admin>
Order Deny,Allow
Allow from [MY IP]
Deny from all
</LocationMatch>
You could use mod_rewrite to match the %{QUERY_STRING} and disallow anything that's not empty, unless it's from your IP. 您可以使用mod_rewrite来匹配%{QUERY_STRING},并禁止所有不为空的内容,除非这些内容来自您的IP。 Check the wiki for examples. 查看Wiki以获取示例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.