I have this .htaccess file (this was the one that came with laravel. The only changes I made were to force https in the URL and the code shown below:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
...
RewriteEngine On
...
# This block works perfectly
RewriteCond %{REQUEST_URI} ^(/phpmyadmin.*)$
RewriteCond %{REMOTE_ADDR} !^xxx\.xxx\.xxx\.xxx$
RewriteRule ^(.*)$ /404 [R=301,L]
# This block doesnt
RewriteCond %{REQUEST_URI} ^(/processor.*)$
RewriteCond %{REMOTE_ADDR} !^xxx\.xxx\.xxx\.xxx$
RewriteRule ^(.*)$ /404 [R=301,L]
</IfModule>
What I want to achieve is that some of my pages are IP locked. I have achieved this with the first block above.
The second block does not work on blocking all IP address except for the specified when it's EXACTLY the same. It's still accessible to the public.