.htaccess files not being used

#1
I have the following folder structure

domain.com (/public_html/)
sub.domain.com (/public_html/sub/)
sub.domain.com/dir1/ (/public_html/sub/dir1/)
sub.domain.com/dir1/dir2/ (/public_html/sub/dir1/dir2/)


if I put the following in my .htaccess file at any of these directories

Code:
DirectoryIndex index.php

require valid-user
<RequireAny>
    Require ip x.x.x.x
</RequireAny>
It has no effect when loading any files in these directories. What am I missing here?

Apache did follow these rules set, but switching to litespeed has meant that IP restrictions have been ignored
 
#2
Code:
order deny,allow
deny from all
allow from Your-IP
this works absolutely fine so it's something about the require function not working
 
Top