we would like to limit access to a directory to several IP blocks. i created an .htaccess file and it works on our dev server but not in production. the error we see in production is:
Forbidden
You don’t have permission to access this resource.
here is what the .htaccess looks like:
<RequireAny>
Require ip 192.168.1.0/24
Require ip 192.168.2.0/24
Require ip 192.168.3.0/24
</RequireAny>
those are just place holder IP blocks. has anyone attempted to restrict access to livewhale resources in this way? it is strange that it works on our dev server but in production.
We generally don’t advise direct editing of .htaccess – as you know, it’s one of the few places where a single typo can take down the whole site, so we generally want that to be our problem as your web host rather than yours
In this case, also, the server architecture is different on dev vs prod, in terms of CloudFront, the Web Application Firewall, the Load Balancer, etc, so if you have IP ranges you need blocked, you can go ahead and submit the addresses/ranges you want blocked to the Request Help Form checking off the non-urgent Server category. Then we can queue those up for our server team to blocklist at the firewall level, rather than waiting until they reach Apache and .htaccess. Thanks!