Add this to the beginning of your .htaccess:
RewriteEngine on
RewriteCond %{REMOTE_ADDR} #####
RewriteCond %{REQUEST_URI} !=/home.php
RewriteRule .* /home.php [L]
Change /home.php to the page you wish locked users to be redirected to
Change ##### to a regex pattern to match your IP ranges.
Generate a regex pattern with an IP range here: https://d-fault.nl/CIDRtoRegEx
1. For example, the IP range could be 1.1.1.1/24
2. Converted, it looks like ^(1\.1\.1\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5])))$
3. Then the rule would be RewriteCond %{REMOTE_ADDR} ^(1\.1\.1\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5])))$
When users visit the site and their IP is within that range, they will be automatically redirected to /home.php, and if they try to navigate to a different page, they will be sent back to the home page.