From: Lucien Gentis Date: Sun, 1 Apr 2012 15:42:54 +0000 (+0000) Subject: Updates. X-Git-Tag: 2.2.23~205 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3eb6e8da53129d22d058304d6c6c9f7e3cbd2051;p=thirdparty%2Fapache%2Fhttpd.git Updates. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1308142 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/new_features_2_0.xml.fr b/docs/manual/new_features_2_0.xml.fr index b85880f5802..188ed9aa3d3 100644 --- a/docs/manual/new_features_2_0.xml.fr +++ b/docs/manual/new_features_2_0.xml.fr @@ -1,7 +1,7 @@ - + + @@ -686,10 +686,31 @@ RewriteRule (.*\.html) docs.php?$1 qu'à la règle qui la suit immédiatement. Ainsi, si vous voulez qu'une directive RewriteCond s'applique à plusieurs règles RewriteRule, une technique possible consiste à inverser ces -conditions et à utiliser le drapeau [Skip]. Cette technique permet +conditions et à ajouter une RewriteRule avec le drapeau [Skip]. Cette technique permet d'élaborer des pseudo-constructions if-then-else : la dernière règle du bloc then contiendra skip=N, où N est le nombre de règles -contenues dans le bloc else.

+contenues dans le bloc else :

+ +# Est-ce que le fichier existe ?
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+ +# Create an if-then-else construct by skipping 3 lines if we meant to go to the "else" stanza.
+RewriteRule .? - [S=3]
+
+# Si le fichier existe, alors : + + RewriteRule (.*\.gif) images.php?$1
+ RewriteRule (.*\.html) docs.php?$1
+ # Skip past the "else" stanza.
+ RewriteRule .? - [S=1]
+
+# ELSE... + + RewriteRule (.*) 404.php?file=$1
+
+# END +