Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用此 RedirectMatch 并受 IP 地址限制?
这就是我现在所拥有的,它按原样工作: RewriteCond %{REMOTE_ADDR} !=127.0.0.1
RewriteCond %{REMOTE_ADDR} !=127.0.0.1
`RedirectMatch 302 ^/dir/.*$ http://mysite.org/myotherdir`
我希望这只有在没有从两个不同的 IP 地址访问时才起作用。来自任何其他 IP 地址的访问都应在我的 .htaccess 中执行此代码。
谢谢!
StackOverflow 上已经提出并回答了这样的问题。检查这个:.htaccess 重定向到所有 IP,但我的。