Hello,

I have spent the last few days trying to find a solution for this, but to no 
avail.

I have directories that contain IP addresses.

/171.35.110.12_some_characters
/172.30.97.4_some_other_random_characters

Now I would like to only allow access to a folder in .htaccess when the referer 
IP address matches the first part of the directory name.

Basically:

<Directory /171.35.110.12_*>
Order Deny,Allow
Deny from All
Allow from 171.35.110.12
</Directory> 

I reckon it'd be a bit of an overkill if I created an entry for every possible 
IP address. ;)

Is it somehow possible to automate this restriction by using some sort of 
variables?

Something like this, to catch all existing folders:

<Directory /($REFERER_IP)_*>
Order Deny,Allow
Deny from All
Allow from ($REFERER_IP)
</Directory> 

If it's possible to do it, what would the exact syntax look like?

Thanks.



      

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to