Restrict URL's starting with /abc to specific IP's [.htaccess guru]
Permalink
I'm trying to protect URL's, starting with a specific slug (let's say /abc), by allowing specific IP's only. Let us assume my IP address is 123.123.123.123. I have the following htaccess code, which does the exact opposite (only allowing /abc and blocking the rest):
Now, does anyone know how to turn that around? So allow everything, EXCEPT the URL's starting with /abc? I tried removing the exclamation mark and several other things, with no success. The code above works though, but that's not what I want to achieve unfortunately.
RewriteCond %{REQUEST_URI} !^/abc RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123 RewriteRule ^(.*)$ - [R=403,L]
Now, does anyone know how to turn that around? So allow everything, EXCEPT the URL's starting with /abc? I tried removing the exclamation mark and several other things, with no success. The code above works though, but that's not what I want to achieve unfortunately.
if the url begins with /abc and the remote address is not one of the three listed, send the browser on its merry way.