Need a hand converting .htaccess from 2.2 to 2.6
I want anyone to access my index.php, but no other files in the directory. However, 3 IPs can access anything in the directory. This .htaccess works fine in apache 2.2, but DO is 2.6, & I can’t find any examples on the web explaining exactly how to convert it. I know that “Allow from all” is now “Require all granted”, but I’m stumped on the proper syntax to allow the 3 IPs into all other files in the directory.
Allow from all -> now use Require all granted
Deny from all
Allow from 126.96.36.199/24
Allow from 188.8.131.52
Allow from 184.108.40.206
Your expertise will be greatly appreciated as I’m pulling the remainder of my hair out.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×