apache_conf DISMISS PUBLIC ACCESS到WordPress REST API;只允许通过相同的域访问API。允许所有管理员访问......动态IP ...
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了apache_conf DISMISS PUBLIC ACCESS到WordPress REST API;只允许通过相同的域访问API。允许所有管理员访问......动态IP ...相关的知识,希望对你有一定的参考价值。
# - DISMISS PUBLIC ACCESS; ONLY ALLOW API ACCESS VIA OWN DOMAIN
# - ALLOW ADMIN ACESS FOR ALL
#
# This example is in the "public_html/api/" folder where
# the WP API is installed.
#
RewriteEngine On
# If the referer is not its own domain
RewriteCond %{HTTP_REFERER} !^http?://architectura.com [NC]
# Then make it forbidden if not an admin login th
RewriteRule !^(wp-admin|wp-login\.php) - [F,L,NC]
# Below would block access to ALL directories within "/api", including WP Login pages.
# RewriteRule ^ - [L,F]
以上是关于apache_conf DISMISS PUBLIC ACCESS到WordPress REST API;只允许通过相同的域访问API。允许所有管理员访问......动态IP ...的主要内容,如果未能解决你的问题,请参考以下文章