wordpress - Restrict single url for a single IP -


i have denied ips except few in htaccess file.

now want new ip allow access 1 particular url (it not html page page wordpress). not want ip access other content of website.

i not want password protection affect other users.

can ?

add new ip list of allowed ones, restrict access uris except allowed one.

assume want deny access of user ip:124.255.124.255 urls except of www.example.com/url-to-hide .after granting access urls, put following code in .htaccess file of root directory:

options +followsymlinks rewriteengine on rewritecond %{remote_addr} ^124\.255\.124\.255  rewritecond %{request_uri} !^/url-to-hide$ rewriterule ^(.*)$ - [f,l] 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -