you can't add <Directory entries in a .htaccess file about the files entry, maybe you could include it all in a single regex expression.
2015-06-08 21:51 GMT+02:00 <mathieu...@laposte.net>: > Hello > > With Apache, I searched to deny access to all *.php URL in a subdirectory. > I succeed with this in .htaccess : > *************************** > Order deny,allow > Allow from All > > <Files ~ "^.*\.php$"> > Deny from All > </Files> > *************************** > > But now, I want to add a extra access for one single URL who was denied. I > made a lot of test but a obtained only no effect or "error 500" for example > with this : > *************************** > Order deny,allow > Allow from All > > <Directory "/home/site/www/repertoire1/repertoire2/"> > <Files "fichier.php"> > Allow from All > </Files> > </Directory> > > <Files ~ "^.*\.php$"> > Deny from All > </Files> > *************************** > > this .htaccess is in "repertoire1" and the URL I want to allow is > http://example.com/repertoire1/repertoire2/fichier.php > I cannot put files in the directory "repertoire2" then I want to put all > access rules in one single .htaccess file > > > Thank you for everyone that can help me to understand how the access rules > work. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > For additional commands, e-mail: users-h...@httpd.apache.org > > -- *Daniel Ferradal* IT Specialist email dferradal at gmail.com linkedin es.linkedin.com/in/danielferradal