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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -