php - htaccess access to file by ip range -
how allow access file users ip in range of ip addresses?
for example file admin.php. , range 0.0.0.0 1.2.3.4.
i need configure access 1 file not directory.
just add filesmatch or files directive limit specific script.
the following block acces scripts ending in "admin.php" :
<filesmatch "admin\.php$"> order deny,allow deny allow 10.0.0.0/24 </filesmatch>
the following block admin.php :
<files "admin.php"> order deny,allow deny allow 10.0.0.0/24 </files>
for more information refer apache docs on configuration sections.
Comments
Post a Comment