php - Allow access from specific url and block access by ip on admin folder -


i have php file front end needs trigger php file admin back-end can't because added in .htaccess:

errordocument 403 "forbidden order allow,deny allow 182.112.0.1/13 allow 76.112.0.1/13 .... 

and echo's in interior of php file forbidden error. there anyway overcome htaccess file?

something like

errordocument 403 "forbidden order allow,deny allow 182.112.0.1/13 allow 76.112.0.1/13 .... allow file.php // doesn't work 

you can use mod_setenvif.

so should work:

setenvifnocase request_uri "file\.php" allowed_php  errordocument 403 "forbidden order allow,deny allow 182.112.0.1/13 allow 76.112.0.1/13 allow env=allowed_php 

Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -