I have denied all IPs except few in htaccess
file.
Now I want a new IP to allow access only 1 particular url (it is not a html page but a page from wordpress
). I do not want this IP to access other content of the website.
I do not want password protection as it will affect all other users.
Can we do something like that ?
Add the new
ip
to the list of allowed ones, then restrict it to access alluri
s except to the allowed one.Assume that you want to deny access of the user with IP:
124.255.124.255
to all urls except ofwww.example.com/url-to-hide
.After granting access to all urls, Put the following code in.htaccess
file of the root directory: