Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3AA3718F8A for ; Mon, 8 Jun 2015 23:06:22 +0000 (UTC) Received: (qmail 46645 invoked by uid 500); 8 Jun 2015 23:06:19 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 46604 invoked by uid 500); 8 Jun 2015 23:06:19 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 46594 invoked by uid 99); 8 Jun 2015 23:06:18 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jun 2015 23:06:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 88465C095F for ; Mon, 8 Jun 2015 23:06:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.9 X-Spam-Level: ** X-Spam-Status: No, score=2.9 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id xcbxKi11k8fr for ; Mon, 8 Jun 2015 23:06:08 +0000 (UTC) Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id EC7B024F8D for ; Mon, 8 Jun 2015 23:06:07 +0000 (UTC) Received: by wgbgq6 with SMTP id gq6so1098771wgb.3 for ; Mon, 08 Jun 2015 16:05:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=lu9nqOBCJmJEopwr8/M9G+YvBsj3wBkAp9iA2n/Ou7A=; b=Sj0/U5aRqX8YcBcPGBJ7NAeH6PG7fJdtNf3he5YWbpnRWxNTJ9Ll8+JaAKTJlQseYg 1/YtdmNSdWkUKVEmM/sIr8eH+RXrteHkwEK5oSnHYz6fp05Bj42jyEeTJDaEatDd4DTf 1p11k2d0ArDRCfA0TgydBxN2vPEWLUGiRTAvrbGtEdyDSQJsJpN1wisZPSH7X4lmN1wl vsJ34f1lsMrp5fAWnUvI1RNQO4Hnj5pPeSEz4CoMeNw7e68QWr39iFv2Dz/kk556WymF xWjuuxvb4dJwE3eqaVjtHlfMBknUkc3IkUMns6ZrC7ofjQ8/nt1/ZA7bLLeHHklvsKyc gN+w== X-Received: by 10.194.248.200 with SMTP id yo8mr35331448wjc.65.1433804722664; Mon, 08 Jun 2015 16:05:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.35.203 with HTTP; Mon, 8 Jun 2015 16:05:01 -0700 (PDT) In-Reply-To: <981031678.5123826.1433793083864.JavaMail.zimbra@laposte.net> References: <1433792445.28354.ezmlm@httpd.apache.org> <981031678.5123826.1433793083864.JavaMail.zimbra@laposte.net> From: Daniel Date: Tue, 9 Jun 2015 01:05:01 +0200 Message-ID: To: "" Content-Type: multipart/alternative; boundary=089e013d1eba2bf9a1051809adbb Subject: Re: [users@httpd] Complex combination of Allow and Deny for Apache --089e013d1eba2bf9a1051809adbb Content-Type: text/plain; charset=UTF-8 you can't add : > 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 > > > Deny from All > > *************************** > > 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 > > > > Allow from All > > > > > Deny from All > > *************************** > > 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-unsubscribe@httpd.apache.org > For additional commands, e-mail: users-help@httpd.apache.org > > -- *Daniel Ferradal* IT Specialist email dferradal at gmail.com linkedin es.linkedin.com/in/danielferradal --089e013d1eba2bf9a1051809adbb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
you can't add <Directory entries in a .htaccess fil= e

about the files entry, maybe you could include it all = in a single regex expression.

2015-06-08 21:51 GMT+02:00 <<= a href=3D"mailto:mathieu700@laposte.net" target=3D"_blank">mathieu700@lapos= te.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$">
=C2=A0 =C2=A0 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" f= or example with this :
***************************
Order deny,allow
Allow from All

<Directory "/home/site/www/repertoire1/repertoire2/">
=C2=A0 =C2=A0 <Files "fichier.php">
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Allow from All
=C2=A0 =C2=A0 </Files>
</Directory>

<Files ~ "^.*\.php$">
=C2=A0 =C2=A0 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-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




--
Daniel Ferradal
IT Specialist

email= =C2=A0 =C2=A0 =C2=A0 =C2=A0 dferradal=C2=A0= at gmail.com
linked= in =C2=A0 =C2=A0 es.linkedin.com/in/danielferradal
--089e013d1eba2bf9a1051809adbb--