Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 17E3210F36 for ; Thu, 6 Feb 2014 14:21:45 +0000 (UTC) Received: (qmail 24386 invoked by uid 500); 6 Feb 2014 14:21:42 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 24333 invoked by uid 500); 6 Feb 2014 14:21:41 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 24326 invoked by uid 99); 6 Feb 2014 14:21:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Feb 2014 14:21:41 +0000 X-ASF-Spam-Status: No, hits=-1995.9 required=5.0 tests=ALL_TRUSTED,FU_COMMON_SUBS2,URI_OBFU_WWW X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Feb 2014 14:21:30 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 95EF123889BF; Thu, 6 Feb 2014 14:21:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1565268 [1/2] - in /httpd/httpd/branches/2.2.x/docs/manual: ./ developer/ howto/ misc/ mod/ platform/ rewrite/ ssl/ Date: Thu, 06 Feb 2014 14:21:06 -0000 To: cvs@httpd.apache.org From: nd@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140206142107.95EF123889BF@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: nd Date: Thu Feb 6 14:21:05 2014 New Revision: 1565268 URL: http://svn.apache.org/r1565268 Log: update transformation Modified: httpd/httpd/branches/2.2.x/docs/manual/caching.html.en httpd/httpd/branches/2.2.x/docs/manual/caching.html.fr httpd/httpd/branches/2.2.x/docs/manual/developer/API.html.en httpd/httpd/branches/2.2.x/docs/manual/developer/filters.html.en httpd/httpd/branches/2.2.x/docs/manual/developer/modules.html.en httpd/httpd/branches/2.2.x/docs/manual/developer/modules.html.ja.utf8 httpd/httpd/branches/2.2.x/docs/manual/developer/request.html.en httpd/httpd/branches/2.2.x/docs/manual/env.html.en httpd/httpd/branches/2.2.x/docs/manual/env.html.ja.utf8 httpd/httpd/branches/2.2.x/docs/manual/env.html.ko.euc-kr httpd/httpd/branches/2.2.x/docs/manual/env.html.tr.utf8 httpd/httpd/branches/2.2.x/docs/manual/howto/cgi.html.en httpd/httpd/branches/2.2.x/docs/manual/misc/rewriteguide.html.ko.euc-kr httpd/httpd/branches/2.2.x/docs/manual/mod/mod_authn_dbd.html.en httpd/httpd/branches/2.2.x/docs/manual/mod/mod_authnz_ldap.html.en httpd/httpd/branches/2.2.x/docs/manual/mod/mod_authnz_ldap.html.fr httpd/httpd/branches/2.2.x/docs/manual/mod/mod_autoindex.html.tr.utf8 httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy.html.en httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy.html.fr httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy_ajp.html.en httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy_ajp.html.ja.utf8 httpd/httpd/branches/2.2.x/docs/manual/mod/mod_rewrite.html.en httpd/httpd/branches/2.2.x/docs/manual/mod/mod_rewrite.html.fr httpd/httpd/branches/2.2.x/docs/manual/mod/mod_ssl.html.en httpd/httpd/branches/2.2.x/docs/manual/mod/mod_usertrack.html.en httpd/httpd/branches/2.2.x/docs/manual/platform/perf-hp.html.en httpd/httpd/branches/2.2.x/docs/manual/platform/perf-hp.html.ko.euc-kr httpd/httpd/branches/2.2.x/docs/manual/platform/win_compiling.html.ko.euc-kr httpd/httpd/branches/2.2.x/docs/manual/rewrite/advanced.html.en httpd/httpd/branches/2.2.x/docs/manual/ssl/ssl_faq.html.en httpd/httpd/branches/2.2.x/docs/manual/ssl/ssl_howto.html.en Modified: httpd/httpd/branches/2.2.x/docs/manual/caching.html.en URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/caching.html.en?rev=1565268&r1=1565267&r2=1565268&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/docs/manual/caching.html.en (original) +++ httpd/httpd/branches/2.2.x/docs/manual/caching.html.en Thu Feb 6 14:21:05 2014 @@ -133,8 +133,7 @@ in which it matters: If you are using Server Side Includes;

-
-<!-- The following include can be cached -->
+      
<!-- The following include can be cached -->
 <!--#include virtual="/footer.html" --> 
 
 <!-- The following include can not be cached -->
@@ -466,8 +465,7 @@ Vary: negotiate,accept-language,accept-c
       the difference in the time it takes to read a file for the first time
       and the second time;

-
-colm@coroebus:~$ time cat testfile > /dev/null
+      
colm@coroebus:~$ time cat testfile > /dev/null
 real    0m0.065s
 user    0m0.000s
 sys     0m0.001s
@@ -534,8 +532,7 @@ sys     0m0.000s

Caching of this type is enabled via;

-
-# Enable memory caching
+      
# Enable memory caching
 CacheEnable mem /
 
 # Limit the size of the cache to 1 Megabyte
@@ -555,8 +552,7 @@ MCacheSize 1024

Typically the module will be configured as so;

-
-CacheRoot   /var/cache/apache/
+    
CacheRoot   /var/cache/apache/
 CacheEnable disk /
 CacheDirLevels 2
 CacheDirLength 1
Modified: httpd/httpd/branches/2.2.x/docs/manual/caching.html.fr URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/caching.html.fr?rev=1565268&r1=1565267&r2=1565268&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/docs/manual/caching.html.fr (original) +++ httpd/httpd/branches/2.2.x/docs/manual/caching.html.fr Thu Feb 6 14:21:05 2014 @@ -151,8 +151,7 @@ En général, cela n'a que peu d'effet, à moins que vous n'utilisiez les Inclusions Côté Serveur (SSI);

-
-<!-- L'inclusion suivante peut être mise en cache -->
+      
<!-- L'inclusion suivante peut être mise en cache -->
 <!--#include virtual="/footer.html" -->
 
 <!-- L'inclusion suivante ne peut pas être mise en cache -->
@@ -530,8 +529,7 @@ Vary: negotiate,accept-language,accept-c
       temps nécessaire à la première lecture d'un fichier et le temps
       nécessaire à sa deuxième lecture;

-
-colm@coroebus:~$ time cat testfile > /dev/null
+      
colm@coroebus:~$ time cat testfile > /dev/null
 real    0m0.065s
 user    0m0.000s
 sys     0m0.001s
@@ -608,8 +606,7 @@ sys     0m0.000s

La mise en cache selon cette méthode est activée comme suit :

-
-# Activation de la mise en cache en mémoire
+      
# Activation de la mise en cache en mémoire
 CacheEnable mem /
 
 # Limite la taille du cache à 1 Mégaoctet
@@ -630,8 +627,7 @@ MCacheSize 1024

Typiquement, le module sera configuré comme suit :

-
-CacheRoot   /var/cache/apache/
+    
CacheRoot   /var/cache/apache/
 CacheEnable disk /
 CacheDirLevels 2
 CacheDirLength 1
Modified: httpd/httpd/branches/2.2.x/docs/manual/developer/API.html.en URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/developer/API.html.en?rev=1565268&r1=1565267&r2=1565268&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/docs/manual/developer/API.html.en (original) +++ httpd/httpd/branches/2.2.x/docs/manual/developer/API.html.en Thu Feb 6 14:21:05 2014 @@ -358,9 +358,7 @@ struct stat finfo; /* Set by server c

int header_only;     /* HEAD request, as opposed to GET */
 char *protocol;      /* Protocol, as given to us, or HTTP/0.9 */
 char *method;        /* GET, HEAD, POST, etc. */
-int method_number;   /* M_GET, M_POST, etc. */
-
-

+int method_number; /* M_GET, M_POST, etc. */

/* Info for logging */

char *the_request;
Modified: httpd/httpd/branches/2.2.x/docs/manual/developer/filters.html.en URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/developer/filters.html.en?rev=1565268&r1=1565267&r2=1565268&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/docs/manual/developer/filters.html.en (original) +++ httpd/httpd/branches/2.2.x/docs/manual/developer/filters.html.en Thu Feb 6 14:21:05 2014 @@ -133,19 +133,15 @@ same set of filters as the main request. A graphical representation might help:

-
-Default_handler --> includes_filter --> byterange --> ...
-
+
Default_handler --> includes_filter --> byterange --> ...

If the includes filter creates a sub request, then we don't want the data from that sub-request to go through the includes filter, because it might not be SSI data. So, the subrequest adds the following:

-
    
-Default_handler --> includes_filter -/-> byterange --> ...
+
Default_handler --> includes_filter -/-> byterange --> ...
                                     /
-Default_handler --> sub_request_core
-
+Default_handler --> sub_request_core

What happens if the subrequest is SSI data? Well, that's easy, the includes_filter is a resource filter, so it will be added to Modified: httpd/httpd/branches/2.2.x/docs/manual/developer/modules.html.en URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/developer/modules.html.en?rev=1565268&r1=1565267&r2=1565268&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/docs/manual/developer/modules.html.en (original) +++ httpd/httpd/branches/2.2.x/docs/manual/developer/modules.html.en Thu Feb 6 14:21:05 2014 @@ -86,8 +86,7 @@ will be called in.

This is the code that was added to mod_mmap_static:

-
-static void register_hooks(void)
+      
static void register_hooks(void)
 {
     static const char * const aszPre[]={ "http_core.c",NULL };
     ap_hook_post_config(mmap_post_config,NULL,NULL,HOOK_MIDDLE);
@@ -131,8 +130,7 @@ static void register_hooks(void)
       creating your module definition. The old defintion looked
       like

-
-module MODULE_VAR_EXPORT module_name_module =
+      
module MODULE_VAR_EXPORT module_name_module =
 {
     STANDARD_MODULE_STUFF,
     /* initializer */
@@ -156,8 +154,7 @@ module MODULE_VAR_EXPORT module_nam
 };

The new structure is a great deal simpler...

-
-module MODULE_VAR_EXPORT module_name_module =
+      
module MODULE_VAR_EXPORT module_name_module =
 {
     STANDARD20_MODULE_STUFF,
     /* create per-directory config structures */

Modified: httpd/httpd/branches/2.2.x/docs/manual/developer/modules.html.ja.utf8
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/developer/modules.html.ja.utf8?rev=1565268&r1=1565267&r2=1565268&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/developer/modules.html.ja.utf8 [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/developer/modules.html.ja.utf8 [utf-8] Thu Feb  6 14:21:05 2014
@@ -95,8 +95,7 @@
 
     

以下は、mod_mmap_static に追加したコードです:

-
-static void register_hooks(void)
+      
static void register_hooks(void)
 {
     static const char * const aszPre[]={ "http_core.c",NULL };
     ap_hook_post_config(mmap_post_config,NULL,NULL,HOOK_MIDDLE);
@@ -139,8 +138,7 @@ static void register_hooks(void)
       

モジュールの定義を作成する際に注意しなければならない ステージの数は激減しています。古い定義は次のようになっていました。

-
-module MODULE_VAR_EXPORT module_name_module =
+      
module MODULE_VAR_EXPORT module_name_module =
 {
     STANDARD_MODULE_STUFF,
     /* initializer */
@@ -164,8 +162,7 @@ module MODULE_VAR_EXPORT module_nam
 };

新しい構造体はとってもシンプルです…

-
-module MODULE_VAR_EXPORT module_name_module =
+      
module MODULE_VAR_EXPORT module_name_module =
 {
     STANDARD20_MODULE_STUFF,
     /* create per-directory config structures */

Modified: httpd/httpd/branches/2.2.x/docs/manual/developer/request.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/developer/request.html.en?rev=1565268&r1=1565267&r2=1565268&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/developer/request.html.en (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/developer/request.html.en Thu Feb  6 14:21:05 2014
@@ -150,8 +150,7 @@
 

The Security Phase

Needs Documentation. Code is:

-
-switch (ap_satisfies(r)) {
+    
switch (ap_satisfies(r)) {
 case SATISFY_ALL:
 case SATISFY_NOSPEC:
         if ((access_status = ap_run_access_checker(r)) != 0) {

Modified: httpd/httpd/branches/2.2.x/docs/manual/env.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/env.html.en?rev=1565268&r1=1565267&r2=1565268&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/env.html.en (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/env.html.en Thu Feb  6 14:21:05 2014
@@ -381,8 +381,7 @@
         httpd.conf to deal with known client problems.  Since the affected clients
         are no longer seen in the wild, this configuration is likely no-longer
         necessary.

-
-#
+
#
 # The following directives modify normal HTTP response behavior.
 # The first directive disables keepalive for Netscape 2.x and browsers that
 # spoof it. There are known problems with these browser implementations.

Modified: httpd/httpd/branches/2.2.x/docs/manual/env.html.ja.utf8
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/env.html.ja.utf8?rev=1565268&r1=1565267&r2=1565268&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/env.html.ja.utf8 [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/env.html.ja.utf8 [utf-8] Thu Feb  6 14:21:05 2014
@@ -343,8 +343,7 @@
         httpd.conf に次の行を加えるよう推奨されていましたが、
         今となっては、問題としていたクライアントは実際には見かけることは
         なくなってきたので、この設定はもはや必要ないかもしれません。

-
-#
+
#
 # The following directives modify normal HTTP response behavior.
 # The first directive disables keepalive for Netscape 2.x and browsers that
 # spoof it. There are known problems with these browser implementations.
@@ -372,8 +371,7 @@ BrowserMatch "JDK/1\.0" force-response-1
         これを変更することで、特定のディレクトリのログ収集をやめたり、
         特定のホストからのリクエストのログ収集をやめたりすることが簡単にできます。
         

-
-SetEnvIf Request_URI \.gif image-request
+    
SetEnvIf Request_URI \.gif image-request
 SetEnvIf Request_URI \.jpg image-request
 SetEnvIf Request_URI \.png image-request
 CustomLog logs/access_log common env=!image-request
@@ -387,8 +385,7 @@ CustomLog logs/access_log common env=!im これは推奨されている設定ではありませんが、ある限定された状況では有効です。 ここでは、すべての画像は /web/images というディレクトリにあると仮定します。

-
-SetEnvIf Referer "^http://www.example.com/" local_referal
+    
SetEnvIf Referer "^http://www.example.com/" local_referal
 # Allow browsers that do not send Referer info
 SetEnvIf Referer "^$" local_referal
 <Directory /web/images>

Modified: httpd/httpd/branches/2.2.x/docs/manual/env.html.ko.euc-kr
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/env.html.ko.euc-kr?rev=1565268&r1=1565267&r2=1565268&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/env.html.ko.euc-kr [euc-kr] (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/env.html.ko.euc-kr [euc-kr] Thu Feb  6 14:21:05 2014
@@ -311,8 +311,7 @@
 
         

클라이언트들의 이미 알려진 문제를 해결하기위해 httpd.conf에 다음 내용을 포함하길 바란다.

-
-#
+
#
 # 다음 지시어들은 일반적인 HTTP 응답을 변경한다.
 # 첫번째 지시어는 Netscape 2.x와 이를 가장한 브라우저에게
 # keepalive를 사용하지 않는다. 이들 브라우저 구현에 문제가 있다.
@@ -338,8 +337,7 @@ BrowserMatch "JDK/1\.0" force-response-1
         

이 예제는 이미지에 대한 요청을 접근 로그에 기록하지 않는다. 특정 디렉토리에 대한 혹은 특정 호스트에서 온 요청을 로그하지 않도록 쉽게 수정할 수 있다.

-
-SetEnvIf Request_URI \.gif image-request
+    
SetEnvIf Request_URI \.gif image-request
 SetEnvIf Request_URI \.jpg image-request
 SetEnvIf Request_URI \.png image-request
 CustomLog logs/access_log common env=!image-request
@@ -353,8 +351,7 @@ CustomLog logs/access_log common env=!im 설정을 권장하지는 않으며, 제한된 경우에만 동작한다. 우리는 모든 이미지가 /web/images 디렉토리 안에 있다고 가정한다.

-
-SetEnvIf Referer "^http://www.example.com/" local_referal
+    
SetEnvIf Referer "^http://www.example.com/" local_referal
 # Referer 정보를 보내지 않는 브라우저를 허용한다
 SetEnvIf Referer "^$" local_referal
 <Directory /web/images>

Modified: httpd/httpd/branches/2.2.x/docs/manual/env.html.tr.utf8
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/env.html.tr.utf8?rev=1565268&r1=1565267&r2=1565268&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/env.html.tr.utf8 [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/env.html.tr.utf8 [utf-8] Thu Feb  6 14:21:05 2014
@@ -383,8 +383,7 @@
           önerilirdi. Fakat, böyle tarayıcılar artık ortalıkta görünmediğinden
           bu yapılandırmaya da artık gerek kalmamıştır.

-
-#
+        
#
 # Aşağıdaki yönergeler normal HTTP yanıt davranışını değiştirirler.
 # İlk yönerge Netscape 2.x ve kendini öyle gösteren tarayıcılar için
 # kalıcı bağlantıyı (keepalive) iptal eder. İkinci yönerge ise HTTP/1.1

Modified: httpd/httpd/branches/2.2.x/docs/manual/howto/cgi.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/howto/cgi.html.en?rev=1565268&r1=1565267&r2=1565268&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/howto/cgi.html.en (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/howto/cgi.html.en Thu Feb  6 14:21:05 2014
@@ -64,9 +64,7 @@
     directive has not been commented out.  A correctly configured directive
     may look like this:
 
-    
-      LoadModule cgi_module modules/mod_cgi.so
-    
+
LoadModule cgi_module modules/mod_cgi.so

ScriptAlias

Modified: httpd/httpd/branches/2.2.x/docs/manual/misc/rewriteguide.html.ko.euc-kr URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/misc/rewriteguide.html.ko.euc-kr?rev=1565268&r1=1565267&r2=1565268&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/docs/manual/misc/rewriteguide.html.ko.euc-kr [euc-kr] (original) +++ httpd/httpd/branches/2.2.x/docs/manual/misc/rewriteguide.html.ko.euc-kr [euc-kr] Thu Feb 6 14:21:05 2014 @@ -115,10 +115,8 @@ 대체하고, /u/user 마지막에 슬래쉬가 없다면 추가한다.

-
-RewriteRule   ^/~([^/]+)/?(.*)    /u/$1/$2  [R]
-RewriteRule   ^/([uge])/([^/]+)$  /$1/$2/   [R]
-
+
RewriteRule   ^/~([^/]+)/?(.*)    /u/$1/$2  [R]
+RewriteRule   ^/([uge])/([^/]+)$  /$1/$2/   [R]
@@ -136,15 +134,13 @@ RewriteRule ^/([uge])/([^/]+해결책:
-
-RewriteCond %{HTTP_HOST}   !^fully\.qualified\.domain\.name [NC]
+
RewriteCond %{HTTP_HOST}   !^fully\.qualified\.domain\.name [NC]
 RewriteCond %{HTTP_HOST}   !^$
 RewriteCond %{SERVER_PORT} !^80$
 RewriteRule ^/(.*)         http://fully.qualified.domain.name:%{SERVER_PORT}/$1 [L,R]
 RewriteCond %{HTTP_HOST}   !^fully\.qualified\.domain\.name [NC]
 RewriteCond %{HTTP_HOST}   !^$
-RewriteRule ^/(.*)         http://fully.qualified.domain.name/$1 [L,R]
-
+RewriteRule ^/(.*) http://fully.qualified.domain.name/$1 [L,R]
@@ -182,10 +178,8 @@ RewriteRule ^/(.*) http://fully. 할 수 없다. mod_rewrite를 사용하면 진짜 간단하다:

-
-RewriteEngine on
-RewriteRule   ^/$  /e/www/  [R]
-
+
RewriteEngine on
+RewriteRule   ^/$  /e/www/  [R]
@@ -225,22 +219,18 @@ RewriteRule ^/$ /e/w

그래서 이를 해결하기위해 다음과 같이 설정한다:

-
-RewriteEngine  on
+
RewriteEngine  on
 RewriteBase    /~quux/
-RewriteRule    ^foo$  foo/  [R]
-
+RewriteRule ^foo$ foo/ [R]

홈디렉토리의 최상위 .htaccess 파일에 다음과 같이 설정할 수도 있다. 그러나 처리하는데 부담이 된다.

-
-RewriteEngine  on
+
RewriteEngine  on
 RewriteBase    /~quux/
 RewriteCond    %{REQUEST_FILENAME}  -d
-RewriteRule    ^(.+[^/])$           $1/  [R]
-
+RewriteRule ^(.+[^/])$ $1/ [R]
@@ -269,35 +259,28 @@ RewriteRule ^(.+[^/] (분산된) 외부맵에 실제 서버 정보를 얻어온다. 외부맵은 다음과 같은 형식이다

-
-user1  server_of_user1
+
user1  server_of_user1
 user2  server_of_user2
-:      :
-
+: :

우리는 이 정보를 각각 map.xxx-to-host 파일에 저장했다. 다음으로 모든 서버에서 URL이 서버에 없다면 다음과 같은 URL을,

-
-/u/user/anypath
+
/u/user/anypath
 /g/group/anypath
-/e/entity/anypath
-
+/e/entity/anypath

다음과 같이 리다이렉션한다

-
-http://physical-host/u/user/anypath
+
http://physical-host/u/user/anypath
 http://physical-host/g/group/anypath
-http://physical-host/e/entity/anypath
-
+http://physical-host/e/entity/anypath

아래 규칙은 맵파일을 사용하여 이 작업을 한다 (server0은 맵에 항목이 없는 경우 사용할 기본서버라고 가정한다):

-
-RewriteEngine on
+
RewriteEngine on
 
 RewriteMap      user-to-host   txt:/path/to/map.user-to-host
 RewriteMap     group-to-host   txt:/path/to/map.group-to-host
@@ -308,8 +291,7 @@ RewriteRule   ^/g/([^/]+)([^/]+)/?(.*) http://${entity-to-host:$1|server0}/e/$1/$2
 
 RewriteRule   ^/([uge])/([^/]+)/?$          /$1/$2/.www/
-RewriteRule   ^/([uge])/([^/]+)/([^.]+.+)   /$1/$2/.www/$3\
-
+RewriteRule ^/([uge])/([^/]+)/([^.]+.+) /$1/$2/.www/$3\
@@ -337,10 +319,8 @@ RewriteRule ^/([uge])/([^/]+)/([^.]+.+ http://newserver/~user/anypath로 리다이렉션하면 된다.

-
-RewriteEngine on
-RewriteRule   ^/~(.+)  http://newserver/~$1  [R,L]
-
+
RewriteEngine on
+RewriteRule   ^/~(.+)  http://newserver/~$1  [R,L]
@@ -369,10 +349,8 @@ RewriteRule ^/~(.+) http://ne

물결표시가 있는 URL을 위와 같은 구조로 변환하기위해 다음 규칙을 사용한다.

-
-RewriteEngine on
-RewriteRule   ^/~(([a-z])[a-z0-9]+)(.*)  /home/$2/$1/.www$3
-
+
RewriteEngine on
+RewriteRule   ^/~(([a-z])[a-z0-9]+)(.*)  /home/$2/$1/.www$3
@@ -396,8 +374,7 @@ RewriteRule ^/~(([a-z]) -
-drwxrwxr-x   2 netsw  users    512 Aug  3 18:39 Audio/
+
drwxrwxr-x   2 netsw  users    512 Aug  3 18:39 Audio/
 drwxrwxr-x   2 netsw  users    512 Jul  9 14:37 Benchmark/
 drwxrwxr-x  12 netsw  users    512 Jul  9 00:34 Crypto/
 drwxrwxr-x   5 netsw  users    512 Jul  9 00:41 Database/
@@ -412,8 +389,7 @@ drwxrwxr-x   2 netsw  users    512 Jul  
 drwxrwxr-x   7 netsw  users    512 Jul  9 09:24 SoftEng/
 drwxrwxr-x   7 netsw  users    512 Jul  9 12:17 System/
 drwxrwxr-x  12 netsw  users    512 Aug  3 20:15 Typesetting/
-drwxrwxr-x  10 netsw  users    512 Jul  9 14:08 X11/
-
+drwxrwxr-x 10 netsw users 512 Jul 9 14:08 X11/

1996년 7월 이 저장소를 멋있는 웹 인터페이스를 통해 세상에 공개하기로 결정햇다. "멋있다"는 말은, 최상위 @@ -431,8 +407,7 @@ drwxrwxr-x 10 netsw users 512 Jul 필요하다. 나는 이 스크립트들을 다음과 같이 /e/netsw/.www/에 두었다:

-
--rw-r--r--   1 netsw  users    1318 Aug  1 18:10 .wwwacl
+
-rw-r--r--   1 netsw  users    1318 Aug  1 18:10 .wwwacl
 drwxr-xr-x  18 netsw  users     512 Aug  5 15:51 DATA/
 -rw-rw-rw-   1 netsw  users  372982 Aug  5 16:35 LOGFILE
 -rw-r--r--   1 netsw  users     659 Aug  4 09:27 TODO
@@ -444,8 +419,7 @@ drwxr-xr-x   2 netsw  users     512 Jul 
 -rwxr-xr-x   1 netsw  users   24050 Aug  5 15:49 netsw-lsdir.cgi
 -rwxr-xr-x   1 netsw  users    1589 Aug  3 18:43 netsw-search.cgi
 -rwxr-xr-x   1 netsw  users    1885 Aug  1 17:41 netsw-tree.cgi
--rw-r--r--   1 netsw  users     234 Jul 30 16:35 netsw-unlimit.lst
-
+-rw-r--r-- 1 netsw users 234 Jul 30 16:35 netsw-unlimit.lst

DATA/ 하위디렉토리에 위에서 말한 저장소가 있다. 실제 net.sw의 내용은 보통 @@ -457,18 +431,15 @@ drwxr-xr-x 2 netsw users 512 Jul URL /net.sw/를 내부 경로 /e/netsw로 재작성하기위해 디렉토리별 설정파일에 다음과 같이 설정한다:

-
-RewriteRule  ^net.sw$       net.sw/        [R]
-RewriteRule  ^net.sw/(.*)$  e/netsw/$1
-
+
RewriteRule  ^net.sw$       net.sw/        [R]
+RewriteRule  ^net.sw/(.*)$  e/netsw/$1

첫번째 규칙은 마지막에 슬래쉬가 없는 요청을 위해서 사용했다! 두번째 규칙이 실제 작업을 한다. 그리고 디렉토리별 설정파일 /e/netsw/.www/.wwwacl에 결정적인 설정이 나온다:

-
-Options       ExecCGI FollowSymLinks Includes MultiViews
+
Options       ExecCGI FollowSymLinks Includes MultiViews
 
 RewriteEngine on
 
@@ -495,8 +466,7 @@ RewriteRule   ^netsw-img/.*$           -
 #  다른 cgi 스크립트가 처리할
 #  하위디렉토리가 남았다
 RewriteRule   !^netsw-lsdir\.cgi.*     -                  [C]
-RewriteRule   (.*)                     netsw-lsdir.cgi/$1
-
+RewriteRule (.*) netsw-lsdir.cgi/$1

해석을 위한 힌트:

@@ -540,10 +510,8 @@ RewriteRule (.*) n

모든 요청에서 앞부분을 동적으로 제거하는 전역 규칙을 사용한다:

-
-RewriteEngine  on
-RewriteRule    ^/cgi-bin/imagemap(.*)  $1  [PT]
-
+
RewriteEngine  on
+RewriteRule    ^/cgi-bin/imagemap(.*)  $1  [PT]
@@ -567,8 +535,7 @@ RewriteRule ^/cgi-bin/imagemap(.*) $

여러 디렉토리에서 파일을 찾는 규칙을 직접 프로그램한다.

-
-RewriteEngine on
+
RewriteEngine on
 
 #   먼저 custom/에서 찾길 시도하고...
 #   ...찾으면 끝!
@@ -581,8 +548,7 @@ RewriteCond         /your/docroot/dir2/$1  [L]
 
 #   못찾으면 다른 Alias나 ScriptAlias 지시어 등으로 진행한다.
-RewriteRule   ^(.+)  -  [PT]
-
+RewriteRule ^(.+) - [PT]
@@ -610,10 +576,8 @@ RewriteRule ^(.+) - [PT] /foo/bar/로 변환되고 STATUS라는 환경변수 값을 "java"로 설정한다.

-
-RewriteEngine on
-RewriteRule   ^(.*)/S=([^/]+)/(.*)    $1/$3 [E=STATUS:$2]
-
+
RewriteEngine on
+RewriteRule   ^(.*)/S=([^/]+)/(.*)    $1/$3 [E=STATUS:$2]
@@ -642,12 +606,10 @@ RewriteRule ^(.*)/S=([^/]+)/home/username/anypath로 재작성할 수 있다:

-
-RewriteEngine on
+
RewriteEngine on
 RewriteCond   %{HTTP_HOST}                 ^www\.[^.]+\.host\.com$
 RewriteRule   ^(.+)                        %{HTTP_HOST}$1          [C]
-RewriteRule   ^www\.([^.]+)\.host\.com(.*) /home/$1$2
-
+RewriteRule ^www\.([^.]+)\.host\.com(.*) /home/$1$2
@@ -672,11 +634,9 @@ RewriteRule ^www\.([^.]+)

재작성 조건을 사용하면 된다:

-
-RewriteEngine on
+
RewriteEngine on
 RewriteCond   %{REMOTE_HOST}  !^.+\.ourdomain\.com$
-RewriteRule   ^(/~.+)         http://www.somewhere.com/$1 [R,L]
-
+RewriteRule ^(/~.+) http://www.somewhere.com/$1 [R,L]
@@ -704,21 +664,17 @@ RewriteRule ^(/~.+) http://www

첫번째 방법은 빠르지만 유연성이 떨어지고 완전하지 않다:

-
-RewriteEngine on
+
RewriteEngine on
 RewriteCond   /your/docroot/%{REQUEST_FILENAME} !-f
-RewriteRule   ^(.+)                             http://webserverB.dom/$1
-
+RewriteRule ^(.+) http://webserverB.dom/$1

이 방법의 단점은 DocumentRoot 안에 있는 페이지만 가능하다는 점이다. (예를 들어 홈디렉토리 등을 위해) 조건을 추가할 수 있지만, 더 좋은 방법이 있다:

-
-RewriteEngine on
+
RewriteEngine on
 RewriteCond   %{REQUEST_URI} !-U
-RewriteRule   ^(.+)          http://webserverB.dom/$1
-
+RewriteRule ^(.+) http://webserverB.dom/$1

mod_rewrite의 URL 전방참조(look-ahead)를 사용한다. 그래서 모든 URL에 동작하고 안전하다. 그러나 @@ -757,17 +713,14 @@ RewriteRule ^(.+) http://xredirect:를 도입한다:

-
-RewriteRule ^xredirect:(.+) /path/to/nph-xredirect.cgi/$1 \
-            [T=application/x-httpd-cgi,L]
-
+
RewriteRule ^xredirect:(.+) /path/to/nph-xredirect.cgi/$1 \
+            [T=application/x-httpd-cgi,L]

그러면 xredirect:로 시작하는 모든 URL은 nph-xredirect.cgi 프로그램을 통하게 된다. 프로그램은 다음과 같다:

-
-#!/path/to/perl
+
#!/path/to/perl
 ##
 ##  nph-xredirect.cgi -- NPH/CGI script for extended redirects
 ##  Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved.
@@ -791,17 +744,14 @@ print "The document has moved <a HREF
 print "</body>\n";
 print "</html>\n";
 
-##EOF##
-
+##EOF##

그러면 mod_rewrite가 직접 받지못하는 모든 URL scheme으로 리다이렉션할 수 있다. 예를 들어, 다음과 같이 news:newsgroup으로 리다이렉션할 수 있다

-
-RewriteRule ^anyurl  xredirect:news:newsgroup
-
+
RewriteRule ^anyurl  xredirect:news:newsgroup
주의: 위의 특별한 "통과" 규칙을 사용하여 xredirect:를 마지막에 확장해야 하기때문에 @@ -838,15 +788,12 @@ RewriteRule ^anyurl xredirect:news:news 사용하여 위치를 추정할 수 있다. 복잡히 엮인 규칙에서 최상위 도메인을 중계맵의 키로 사용한다.

-
-RewriteEngine on
+
RewriteEngine on
 RewriteMap    multiplex                txt:/path/to/map.cxan
 RewriteRule   ^/CxAN/(.*)              %{REMOTE_HOST}::$1                 [C]
-RewriteRule   ^.+\.([a-zA-Z]+)::(.*)$  ${multiplex:$1|ftp.default.dom}$2  [R,L]
-
+RewriteRule ^.+\.([a-zA-Z]+)::(.*)$ ${multiplex:$1|ftp.default.dom}$2 [R,L]
-
-##
+
##
 ##  map.cxan -- Multiplexing Map for CxAN
 ##
 
@@ -854,8 +801,7 @@ de        ftp://ftp.cxan.de/CxAN/
 uk        ftp://ftp.cxan.uk/CxAN/
 com       ftp://ftp.cxan.com/CxAN/
  :
-##EOF##
-
+##EOF##
@@ -884,13 +830,11 @@ com ftp://ftp.cxan.com/CxAN/ =STRING을 사용하여 시간에 따라 리다이렉션할 수 있다:

-
-RewriteEngine on
+
RewriteEngine on
 RewriteCond   %{TIME_HOUR}%{TIME_MIN} >0700
 RewriteCond   %{TIME_HOUR}%{TIME_MIN} <1900
 RewriteRule   ^foo\.html$             foo.day.html
-RewriteRule   ^foo\.html$             foo.night.html
-
+RewriteRule ^foo\.html$ foo.night.html

URL foo.html을 요청하면 07:00-19:00 동안 foo.day.html @@ -925,8 +869,7 @@ RewriteRule ^foo\.html$ fo 없으면 URL을 원래 상태로 재작성한다.

-
-#   문서.html 이 없고
+
#   문서.html 이 없고
 #   문서.phtml 만 있는 경우
 #   문서.html 을 문서.phtml 로
 #   재작성하는 역호환 규칙
@@ -939,8 +882,7 @@ RewriteCond   %{REQUEST_FILENAME}.phtml 
 RewriteRule   ^(.*)$ $1.phtml                   [S=1]
 #   아니면 앞에서 찾은 기본이름을 되돌린다
 RewriteCond   %{ENV:WasHTML}            ^yes$
-RewriteRule   ^(.*)$ $1.html
-
+RewriteRule ^(.*)$ $1.html
@@ -972,11 +914,9 @@ RewriteRule ^(.*)$ $1.html

다음 규칙으로 이전 URL을 내부적으로 새로운 URL로 재작성한다:

-
-RewriteEngine  on
+
RewriteEngine  on
 RewriteBase    /~quux/
-RewriteRule    ^foo\.html$  bar.html
-
+RewriteRule ^foo\.html$ bar.html
@@ -1003,11 +943,9 @@ RewriteRule ^foo\.ht

새로운 URL로 HTTP 리다이렉션하다. 그러면 브라우저가 새로운 URL를 보이고 변경사실을 사용자가 알게된다:

-
-RewriteEngine  on
+
RewriteEngine  on
 RewriteBase    /~quux/
-RewriteRule    ^foo\.html$  bar.html  [R]
-
+RewriteRule ^foo\.html$ bar.html [R]
@@ -1042,16 +980,14 @@ RewriteRule ^foo\.ht foo.32.html 페이지를 받는다. 아래 규칙이 이 작업을 한다:

-
-RewriteCond %{HTTP_USER_AGENT}  ^Mozilla/3.*
+
RewriteCond %{HTTP_USER_AGENT}  ^Mozilla/3.*
 RewriteRule ^foo\.html$         foo.NS.html          [L]
 
 RewriteCond %{HTTP_USER_AGENT}  ^Lynx/.*         [OR]
 RewriteCond %{HTTP_USER_AGENT}  ^Mozilla/[12].*
 RewriteRule ^foo\.html$         foo.20.html          [L]
 
-RewriteRule ^foo\.html$         foo.32.html          [L]
-
+RewriteRule ^foo\.html$ foo.32.html [L]
@@ -1084,17 +1020,13 @@ RewriteRule ^foo\.html$ foo.[P]) 사용하여 외부 웹페이지 혹은 외부 웹공간 전체를 우리 이름공간으로 대응한다:

-
-RewriteEngine  on
+
RewriteEngine  on
 RewriteBase    /~quux/
-RewriteRule    ^hotsheet/(.*)$  http://www.tstimpreso.com/hotsheet/$1  [P]
-
+RewriteRule ^hotsheet/(.*)$ http://www.tstimpreso.com/hotsheet/$1 [P]
-
-RewriteEngine  on
+
RewriteEngine  on
 RewriteBase    /~quux/
-RewriteRule    ^usa-news\.html$   http://www.quux-corp.com/news/index.html  [P]
-
+RewriteRule ^usa-news\.html$ http://www.quux-corp.com/news/index.html [P]
@@ -1112,11 +1044,9 @@ RewriteRule ^usa-news\.html해결책:
-
-RewriteEngine on
+
RewriteEngine on
 RewriteCond   /mirror/of/remotesite/$1           -U
-RewriteRule   ^http://www\.remotesite\.com/(.*)$ /mirror/of/remotesite/$1
-
+RewriteRule ^http://www\.remotesite\.com/(.*)$ /mirror/of/remotesite/$1
@@ -1153,12 +1083,10 @@ RewriteRule ^http://www\.remotesite\.c proxy throughput 기능을 통해 요청하는 mod_rewrite 규칙을 작성한다:

-
-RewriteRule ^/~([^/]+)/?(.*)          /home/$1/.www/$2
+
RewriteRule ^/~([^/]+)/?(.*)          /home/$1/.www/$2
 RewriteCond %{REQUEST_FILENAME}       !-f
 RewriteCond %{REQUEST_FILENAME}       !-d
-RewriteRule ^/home/([^/]+)/.www/?(.*) http://www2.quux-corp.dom/~$1/pub/$2 [P]
-
+RewriteRule ^/home/([^/]+)/.www/?(.*) http://www2.quux-corp.dom/~$1/pub/$2 [P]
@@ -1193,26 +1121,22 @@ RewriteRule ^/home/([^/]+)/.www/?(.*) ht 같이 DNS A(address) 레코드에 www[0-9].foo.com을 설정한다.

-
-www0   IN  A       1.2.3.1
+
www0   IN  A       1.2.3.1
 www1   IN  A       1.2.3.2
 www2   IN  A       1.2.3.3
 www3   IN  A       1.2.3.4
 www4   IN  A       1.2.3.5
-www5   IN  A       1.2.3.6
-
+www5 IN A 1.2.3.6

그리고 다음 항목을 추가한다:

-
-www    IN  CNAME   www0.foo.com.
+
www    IN  CNAME   www0.foo.com.
        IN  CNAME   www1.foo.com.
        IN  CNAME   www2.foo.com.
        IN  CNAME   www3.foo.com.
        IN  CNAME   www4.foo.com.
        IN  CNAME   www5.foo.com.
-       IN  CNAME   www6.foo.com.
-
+ IN CNAME www6.foo.com.

잘못된 것처럼 보이지만, 실제로 BIND의 의도된 기능이다. 이제 www.foo.com을 @@ -1246,9 +1170,7 @@ www IN CNAME www0.foo.com. 사용하여 www0.foo.com이 실제 www.foo.com을 전담하게 한다

-
-www    IN  CNAME   www0.foo.com.
-
+
www    IN  CNAME   www0.foo.com.

그리고 www0.foo.com을 프록시전용 서버로 변경한다. 즉, URL을 받으면 서버는 내부 @@ -1257,16 +1179,13 @@ www IN CNAME www0.foo.com. 로드밸런싱 스크립트 lb.pl로 보내는 규칙을 만든다.

-
-RewriteEngine on
+
RewriteEngine on
 RewriteMap    lb      prg:/path/to/lb.pl
-RewriteRule   ^/(.+)$ ${lb:$1}           [P,L]
-
+RewriteRule ^/(.+)$ ${lb:$1} [P,L]

lb.pl을 작성한다:

-
-#!/path/to/perl
+
#!/path/to/perl
 ##
 ##  lb.pl -- 로드밸런싱 스크립트
 ##
@@ -1285,8 +1204,7 @@ while (<STDIN>) {
     print "http://$server/$_";
 }
 
-##EOF##
-
+##EOF##
마지막 주의: 왜 이 방법이 유용한가? www0.foo.com에 부담이 가지않는가? @@ -1332,10 +1250,8 @@ while (<STDIN>) { /~user/foo/bar.scgi/ 형식의 URL을 원하기때문이다. 다음 규칙이 문제를 해결한다:

-
-RewriteRule ^/[uge]/([^/]+)/\.www/(.+)\.scgi(.*) ...
-... /internal/cgi/user/cgiwrap/~$1/$2.scgi$3  [NS,T=application/x-http-cgi]
-
+
RewriteRule ^/[uge]/([^/]+)/\.www/(.+)\.scgi(.*) ...
+... /internal/cgi/user/cgiwrap/~$1/$2.scgi$3  [NS,T=application/x-http-cgi]

이제 다른 멋진 프로그램, (URL 하위트리에 대한 access.log를 출력하는) wwwlog와 @@ -1346,9 +1262,7 @@ RewriteRule ^/[uge]/([^/]+)/u/user/foo/에 대해 swwidx 프로그램을 실행한다면 다음과 같은 링크를 사용한다

-
-/internal/cgi/user/swwidx?i=/u/user/foo/
-
+
/internal/cgi/user/swwidx?i=/u/user/foo/

깔끔하지 않다. 링크에 영역의 위치 CGI 위치를 모두 적어야 하기때문이다. @@ -1362,24 +1276,18 @@ RewriteRule ^/[uge]/([^/]+)해결책은 자동으로 적절한 CGI를 실행하는 새로운 특별한 URL 형식을 만드는 것이다. 다음과 같이 설정한다:

-
-RewriteRule   ^/([uge])/([^/]+)(/?.*)/\*  /internal/cgi/user/wwwidx?i=/$1/$2$3/
-RewriteRule   ^/([uge])/([^/]+)(/?.*):log /internal/cgi/user/wwwlog?f=/$1/$2$3
-
+
RewriteRule   ^/([uge])/([^/]+)(/?.*)/\*  /internal/cgi/user/wwwidx?i=/$1/$2$3/
+RewriteRule   ^/([uge])/([^/]+)(/?.*):log /internal/cgi/user/wwwlog?f=/$1/$2$3

이제 /u/user/foo/을 검색하는 링크는 다음과 같다

-
-HREF="*"
-/u/user/foo/* (???)
-
+
HREF="*"
+/u/user/foo/* (???)

내부적으로 다음과 같이 자동변환된다

-
-/internal/cgi/user/wwwidx?i=/u/user/foo/
-
+
/internal/cgi/user/wwwidx?i=/u/user/foo/

같은 방법으로 링크 뒤에 :log를 사용하여 접근 로그 CGI 프로그램을 실행할 수 있다.

@@ -1409,11 +1317,9 @@ HREF="*" /~quux/foo.html를 요청하면 내부적으로 /~quux/foo.cgi를 실행하게 된다.

-
-RewriteEngine  on
+
RewriteEngine  on
 RewriteBase    /~quux/
-RewriteRule    ^foo\.html$  foo.cgi  [T=application/x-httpd-cgi]
-
+RewriteRule ^foo\.html$ foo.cgi [T=application/x-httpd-cgi]
@@ -1441,10 +1347,8 @@ RewriteRule ^foo\.html 다음 규칙을 사용한다: -
-RewriteCond %{REQUEST_FILENAME}   !-s
-RewriteRule ^page\.html$          page.cgi   [T=application/x-httpd-cgi,L]
-
+
RewriteCond %{REQUEST_FILENAME}   !-s
+RewriteRule ^page\.html$          page.cgi   [T=application/x-httpd-cgi,L]

여기서 page.html를 요청할때 page.html이 없거나 파일크기가 0인 경우 @@ -1482,27 +1386,20 @@ RewriteRule ^page\.html :refresh를 추가하기만 하면 파일시스템에서 수정될 때마다 새로 고침한다.

-
-RewriteRule   ^(/[uge]/[^/]+/?.*):refresh  /internal/cgi/apache/nph-refresh?f=$1
-
+
RewriteRule   ^(/[uge]/[^/]+/?.*):refresh  /internal/cgi/apache/nph-refresh?f=$1

이제 다음 URL에 접근하면

-
-/u/foo/bar/page.html:refresh
-
+
/u/foo/bar/page.html:refresh

다음 URL을 내부적으로 부른다

-
-/internal/cgi/apache/nph-refresh?f=/u/foo/bar/page.html
-
+
/internal/cgi/apache/nph-refresh?f=/u/foo/bar/page.html

이제 NPH-CGI 스크립트만 남았다. 보통 "독자에게 연습으로 남겨둠"이라고 말하지만 ;-) 나는 이것도 제공한다.

-
-#!/sw/bin/perl
+
#!/sw/bin/perl
 ##
 ##  nph-refresh -- NPH/CGI script for auto refreshing pages
 ##  Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved.
@@ -1602,8 +1499,7 @@ for ($n = 0; $n &lt; $QS_n; $n++) {
 
 exit(0);
 
-##EOF##
-
+##EOF##
@@ -1629,18 +1525,15 @@ exit(0); 기능을 (플래그 [P]) 사용하여 외부 웹페이지 혹은 전체 외부 웹영역을 우리의 이름공간에 대응한다:

-
-##
+
##
 ##  vhost.map
 ##
 www.vhost1.dom:80  /path/to/docroot/vhost1
 www.vhost2.dom:80  /path/to/docroot/vhost2
      :
-www.vhostN.dom:80  /path/to/docroot/vhostN
-
+www.vhostN.dom:80 /path/to/docroot/vhostN
-
-##
+
##
 ##  httpd.conf
 ##
     :
@@ -1686,8 +1579,7 @@ RewriteCond   ${vhost:%1}  ^(/.*)$
 #   5. 마지막으로 URL을 문서 위치로 대응하고
 #      로그에 남기기위해 가상호스트를 기억해 둔다
 RewriteRule   ^/(.*)$   %1/$1  [E=VHOST:${lowercase:%{HTTP_HOST}}]
-    :
-
+ :
@@ -1723,11 +1615,9 @@ RewriteRule ^/(.*)$ %1/$1 [E=VHOST: 막는 것으로는 불충분하며, 그 호스트의 사용자도 막아버리게 된다. User-Agent HTTP 헤더 정보도 비교한다.

-
-RewriteCond %{HTTP_USER_AGENT}   ^NameOfBadRobot.*
+
RewriteCond %{HTTP_USER_AGENT}   ^NameOfBadRobot.*
 RewriteCond %{REMOTE_ADDR}       ^123\.45\.67\.[8-9]$
-RewriteRule ^/~quux/foo/arc/.+   -   [F]
-
+RewriteRule ^/~quux/foo/arc/.+ - [F]
@@ -1753,17 +1643,13 @@ RewriteRule ^/~quux/foo/arc/그림을 100% 보호할 수는 없지만, 최소한 브라우저가 HTTP Referer 헤더를 보내는 경우 제한할 수 있다.

-
-RewriteCond %{HTTP_REFERER} !^$
+
RewriteCond %{HTTP_REFERER} !^$
 RewriteCond %{HTTP_REFERER} !^http://www.quux-corp.de/~quux/.*$ [NC]
-RewriteRule .*\.gif$        -                                    [F]
-
+RewriteRule .*\.gif$ - [F]
-
-RewriteCond %{HTTP_REFERER}         !^$
+
RewriteCond %{HTTP_REFERER}         !^$
 RewriteCond %{HTTP_REFERER}         !.*/foo-with-gif\.html$
-RewriteRule ^inlined-in-foo\.gif$   -                        [F]
-
+RewriteRule ^inlined-in-foo\.gif$ - [F]
@@ -1786,28 +1672,23 @@ RewriteRule ^inlined-in-foo\.gif

아파치 >= 1.3b6에서:

-
-RewriteEngine on
+
RewriteEngine on
 RewriteMap    hosts-deny  txt:/path/to/hosts.deny
 RewriteCond   ${hosts-deny:%{REMOTE_HOST}|NOT-FOUND} !=NOT-FOUND [OR]
 RewriteCond   ${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND} !=NOT-FOUND
-RewriteRule   ^/.*  -  [F]
-
+RewriteRule ^/.* - [F]

아파치 <= 1.3b6에서:

-
-RewriteEngine on
+
RewriteEngine on
 RewriteMap    hosts-deny  txt:/path/to/hosts.deny
 RewriteRule   ^/(.*)$ ${hosts-deny:%{REMOTE_HOST}|NOT-FOUND}/$1
 RewriteRule   !^NOT-FOUND/.* - [F]
 RewriteRule   ^NOT-FOUND/(.*)$ ${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND}/$1
 RewriteRule   !^NOT-FOUND/.* - [F]
-RewriteRule   ^NOT-FOUND/(.*)$ /$1
-
+RewriteRule ^NOT-FOUND/(.*)$ /$1
-
-##
+
##
 ##  hosts.deny
 ##
 ##  주의! 이것은 목록처럼 보이지만 목록이 아니라 맵이다.
@@ -1817,8 +1698,7 @@ RewriteRule   ^NOT-FOUND/(.*)$ /$1
 
 193.102.180.41 -
 bsdti1.sdm.de  -
-192.76.162.40  -
-
+192.76.162.40 -
@@ -1845,17 +1725,13 @@ bsdti1.sdm.de - mod_proxy 이전에 불린다. 이제 다음과 같이 특정 호스트를 거부하도록 설정한다...

-
-RewriteCond %{REMOTE_HOST} ^badhost\.mydomain\.com$
-RewriteRule !^http://[^/.]\.mydomain.com.*  - [F]
-
+
RewriteCond %{REMOTE_HOST} ^badhost\.mydomain\.com$
+RewriteRule !^http://[^/.]\.mydomain.com.*  - [F]

...그리고 다음은 user@host에 따라 거부한다:

-
-RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST}  ^badguy@badhost\.mydomain\.com$
-RewriteRule !^http://[^/.]\.mydomain.com.*  - [F]
-
+
RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST}  ^badguy@badhost\.mydomain\.com$
+RewriteRule !^http://[^/.]\.mydomain.com.*  - [F]
@@ -1880,12 +1756,10 @@ RewriteRule !^http://[^/.]\.mydomain.com

친구만 접근이 가능하도록 재작성 규칙들을 사용한다:

-
-RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} !^friend1@client1.quux-corp\.com$
+
RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} !^friend1@client1.quux-corp\.com$
 RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} !^friend2@client2.quux-corp\.com$
 RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} !^friend3@client3.quux-corp\.com$
-RewriteRule ^/~quux/only-for-friends/      -                                 [F]
-
+RewriteRule ^/~quux/only-for-friends/ - [F]
@@ -1908,8 +1782,7 @@ RewriteRule ^/~quux/only-for-friends/

다음과 같이 복잡한 규칙을...

-
-RewriteMap  deflector txt:/path/to/deflector.map
+
RewriteMap  deflector txt:/path/to/deflector.map
 
 RewriteCond %{HTTP_REFERER} !=""
 RewriteCond ${deflector:%{HTTP_REFERER}} ^-$
@@ -1917,20 +1790,17 @@ RewriteRule ^.* %{HTTP_REFERER} [R,L]
 
 RewriteCond %{HTTP_REFERER} !=""
 RewriteCond ${deflector:%{HTTP_REFERER}|NOT-FOUND} !=NOT-FOUND
-RewriteRule ^.* ${deflector:%{HTTP_REFERER}} [R,L]
-
+RewriteRule ^.* ${deflector:%{HTTP_REFERER}} [R,L]

... 재작성 맵과 같이 사용한다:

-
-##
+
##
 ##  deflector.map
 ##
 
 http://www.badguys.com/bad/index.html    -
 http://www.badguys.com/bad/index2.html   -
-http://www.badguys.com/bad/index3.html   http://somewhere.com/
-
+http://www.badguys.com/bad/index3.html http://somewhere.com/

그러면 요청을 자동으로 (맵에서 값으로 "-"를 사용한 경우) 참조페이지나 (URL이 맵에 있는 경우 두번째 @@ -1967,14 +1837,12 @@ http://www.badguys.com/bad/index3.html STDIN에서 요청한 URL을 받고, (같은 순서로!) 결과 (보통 재작성된) URL을 STDOUT에 출력한다.

-
-RewriteEngine on
+
RewriteEngine on
 RewriteMap    quux-map       prg:/path/to/map.quux.pl
 RewriteRule   ^/~quux/(.*)$  /~quux/${quux-map:$1}
 
-
-#!/path/to/perl
+
#!/path/to/perl
 
 #   아파치 서버가 멈추지 않도록
 #   입출력 버퍼를 사용하지 않는다
@@ -1985,8 +1853,7 @@ $| = 1;
 while (<>) {
     s|^foo/|bar/|;
     print $_;
-}
-
+}

설명하기위해 모든 /~quux/foo/... URL을 /~quux/bar/...로 재작성하는 스크립트를 Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/mod_authn_dbd.html.en URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/mod_authn_dbd.html.en?rev=1565268&r1=1565267&r2=1565268&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/docs/manual/mod/mod_authn_dbd.html.en (original) +++ httpd/httpd/branches/2.2.x/docs/manual/mod/mod_authn_dbd.html.en Thu Feb 6 14:21:05 2014 @@ -78,8 +78,7 @@ the Authentication and DBD frameworks. Please note that you need to load an authorization module, such as mod_authz_user, to get it working.

-
-# mod_dbd configuration
+
# mod_dbd configuration
 DBDriver pgsql
 DBDParams "dbname=apacheauth user=apache password=xxxxxx"
 
@@ -101,8 +100,7 @@ DBDExptime 300
   # mod_authn_dbd SQL query to authenticate a user
   AuthDBDUserPWQuery \
     "SELECT password FROM authn WHERE user = %s"
-</Directory>
-
+</Directory>
top

Exposing Login Information

@@ -135,10 +133,8 @@ configuration required in some web appli will be passed as a single string parameter when the SQL query is executed. It may be referenced within the query statement using a %s format specifier.

-

Example

-AuthDBDUserPWQuery \
-  "SELECT password FROM authn WHERE user = %s"
-
+

Example

AuthDBDUserPWQuery \
+  "SELECT password FROM authn WHERE user = %s"

The first column value of the first row returned by the query statement should be a string containing the encrypted password. Subsequent rows will be ignored. If no rows are returned, the user @@ -170,10 +166,8 @@ AuthDBDUserPWQuery \ The user's ID and the realm, in that order, will be passed as string parameters when the SQL query is executed. They may be referenced within the query statement using %s format specifiers.

-

Example

-AuthDBDUserRealmQuery \
-  "SELECT password FROM authn WHERE user = %s AND realm = %s"
-
+

Example

AuthDBDUserRealmQuery \
+  "SELECT password FROM authn WHERE user = %s AND realm = %s"

The first column value of the first row returned by the query statement should be a string containing the encrypted password. Subsequent rows will be ignored. If no rows are returned, the user Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/mod_authnz_ldap.html.en URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/mod_authnz_ldap.html.en?rev=1565268&r1=1565267&r2=1565268&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/docs/manual/mod/mod_authnz_ldap.html.en (original) +++ httpd/httpd/branches/2.2.x/docs/manual/mod/mod_authnz_ldap.html.en Thu Feb 6 14:21:05 2014 @@ -598,8 +598,7 @@ Require valid-user authentication to it is a matter of adding the following directives to every .htaccess file that gets created in the web

-
-AuthLDAPURL            "the url"
+
AuthLDAPURL            "the url"
 AuthGroupFile mygroupfile
 Require group mygroupfile
 
@@ -724,16 +723,14 @@ Require group mygroupfile

If the value begins with exec: the resulting command will be executed and the first line returned to standard output by the program will be used as the password.

-
-#Password used as-is
+
#Password used as-is
 AuthLDAPBindPassword secret
 
 #Run /path/to/program to get my password
 AuthLDAPBindPassword exec:/path/to/program
 
 #Run /path/to/otherProgram and provide arguments
-AuthLDAPBindPassword "exec:/path/to/otherProgram argument1"
-
+AuthLDAPBindPassword "exec:/path/to/otherProgram argument1"
Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/mod_authnz_ldap.html.fr URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/mod_authnz_ldap.html.fr?rev=1565268&r1=1565267&r2=1565268&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/docs/manual/mod/mod_authnz_ldap.html.fr (original) +++ httpd/httpd/branches/2.2.x/docs/manual/mod/mod_authnz_ldap.html.fr Thu Feb 6 14:21:05 2014 @@ -648,8 +648,7 @@ connexion l'authentification LDAP consiste à ajouter les directives suivantes à chaque fichier .htaccess qui sera créé dans le site web :

-
-AuthLDAPURL            "l'url"
+
AuthLDAPURL            "l'url"
 AuthGroupFile mon-fichier-de-groupes
 Require group mon-fichier-de-groupes
 
@@ -793,16 +792,14 @@ serveur HTTP Apache. commande correspondante est exécutée, et c'est la première ligne qui sera renvoyée par la commande sur la sortie standard qui sera utilisée comme mot de passe.

-
-# Mot de passe spécifié directement
+
# Mot de passe spécifié directement
 AuthLDAPBindPassword secret
 
 # Exécution de /path/to/program pour obtenir le mot de passe
 AuthLDAPBindPassword exec:/path/to/program
 
 # Exécution de /path/to/program avec un argument pour obtenir le mot de passe
-AuthLDAPBindPassword "exec:/path/to/otherProgram argument1"
-
+AuthLDAPBindPassword "exec:/path/to/otherProgram argument1"
Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/mod_autoindex.html.tr.utf8 URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/mod_autoindex.html.tr.utf8?rev=1565268&r1=1565267&r2=1565268&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/docs/manual/mod/mod_autoindex.html.tr.utf8 [utf-8] (original) +++ httpd/httpd/branches/2.2.x/docs/manual/mod/mod_autoindex.html.tr.utf8 [utf-8] Thu Feb 6 14:21:05 2014 @@ -159,8 +159,7 @@ yaptığı gibi dizin içeriğini listel mod_autoindex tarafından son argüman olarak ele alınacak ve çözümleme işlemi o noktada duracaktır.

-
-<form action="" method="get">
+    
<form action="" method="get">
   <input type="text" name="P" value="*" /> ile eşleşen
   <select name="C">
     <option value="N" selected="selected">isme</option>

Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy.html.en?rev=1565268&r1=1565267&r2=1565268&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy.html.en (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy.html.en Thu Feb  6 14:21:05 2014
@@ -1253,8 +1253,7 @@ through
     scheme can be accomplished with mod_rewrite as in the
     following example.

-
-RewriteEngine On
+    
RewriteEngine On
 
 RewriteCond %{HTTPS} =off
 RewriteRule . - [E=protocol:http]
@@ -1263,8 +1262,7 @@ RewriteRule . - [E=protocol:https]
 
 RewriteRule ^/mirror/foo/(.*) %{ENV:protocol}://backend.example.com/$1 [P]
 ProxyPassReverse  /mirror/foo/ http://backend.example.com/
-ProxyPassReverse  /mirror/foo/ https://backend.example.com/
-    
+ProxyPassReverse /mirror/foo/ https://backend.example.com/
Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy.html.fr URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy.html.fr?rev=1565268&r1=1565267&r2=1565268&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy.html.fr (original) +++ httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy.html.fr Thu Feb 6 14:21:05 2014 @@ -1406,8 +1406,7 @@ l'espace d'URLs du serveur localmod_rewrite comme dans l'exemple suivant :

-
-RewriteEngine On
+    
RewriteEngine On
 
 RewriteCond %{HTTPS} =off
 RewriteRule . - [E=protocol:http]
@@ -1416,8 +1415,7 @@ RewriteRule . - [E=protocol:https]
 
 RewriteRule ^/mirror/foo/(.*) %{ENV:protocol}://backend.example.com/$1 [P]
 ProxyPassReverse  /mirror/foo/ http://backend.example.com/
-ProxyPassReverse  /mirror/foo/ https://backend.example.com/
-    
+ProxyPassReverse /mirror/foo/ https://backend.example.com/
Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy_ajp.html.en URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy_ajp.html.en?rev=1565268&r1=1565267&r2=1565268&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy_ajp.html.en (original) +++ httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy_ajp.html.en Thu Feb 6 14:21:05 2014 @@ -342,8 +342,7 @@

Request Packet Structure

For messages from the server to the container of type Forward Request:

-
-AJP13_FORWARD_REQUEST :=
+    
AJP13_FORWARD_REQUEST :=
     prefix_code      (byte) 0x02 = JK_AJP13_FORWARD_REQUEST
     method           (byte)
     protocol         (string)
@@ -356,25 +355,19 @@ AJP13_FORWARD_REQUEST :=
     num_headers      (integer)
     request_headers *(req_header_name req_header_value)
     attributes      *(attribut_name attribute_value)
-    request_terminator (byte) OxFF
-    
+ request_terminator (byte) OxFF

The request_headers have the following structure: -

-req_header_name := 
+    

req_header_name := 
     sc_req_header_name | (string)  [see below for how this is parsed]
 
 sc_req_header_name := 0xA0xx (integer)
 
-req_header_value := (string)
-
+req_header_value := (string)

The attributes are optional and have the following structure:

-
-attribute_name := sc_a_name | (sc_a_req_attribute string)
+    
attribute_name := sc_a_name | (sc_a_req_attribute string)
 
-attribute_value := (string)
-
-    
+attribute_value := (string)

Not that the all-important header is content-length, because it determines whether or not the container looks for another packet immediately.

@@ -527,8 +520,7 @@ attribute_value := (string)

Response Packet Structure

for messages which the container can send back to the server.

-
-AJP13_SEND_BODY_CHUNK :=
+    
AJP13_SEND_BODY_CHUNK :=
   prefix_code   3
   chunk_length  (integer)
   chunk        *(byte)
@@ -555,8 +547,7 @@ AJP13_END_RESPONSE :=
 
 AJP13_GET_BODY_CHUNK :=
   prefix_code       6
-  requested_length  (integer)
-    
+ requested_length (integer)

Details:

Send Body Chunk

The chunk is basically binary data, and is sent directly back to the Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy_ajp.html.ja.utf8 URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy_ajp.html.ja.utf8?rev=1565268&r1=1565267&r2=1565268&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy_ajp.html.ja.utf8 [utf-8] (original) +++ httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy_ajp.html.ja.utf8 [utf-8] Thu Feb 6 14:21:05 2014 @@ -284,8 +284,7 @@

リクエストパケット構造

サーバからコンテナへ送られるメッセージが Forward Request 型の場合 :

-
-AJP13_FORWARD_REQUEST :=
+    
AJP13_FORWARD_REQUEST :=
     prefix_code      (byte) 0x02 = JK_AJP13_FORWARD_REQUEST
     method           (byte)
     protocol         (string)
@@ -298,24 +297,18 @@ AJP13_FORWARD_REQUEST :=
     num_headers      (integer)
     request_headers *(req_header_name req_header_value)
     attributes      *(attribut_name attribute_value)
-    request_terminator (byte) OxFF
-    
+ request_terminator (byte) OxFF

request_headers は次のような構造になっています : -

-req_header_name := 
+    

req_header_name := 
     sc_req_header_name | (string)  [see below for how this is parsed]
 
 sc_req_header_name := 0xA0xx (integer)
 
-req_header_value := (string)
-
+req_header_value := (string)

属性 はオプションで、次のような構造をしています :

-
-attribute_name := sc_a_name | (sc_a_req_attribute string)
+    
attribute_name := sc_a_name | (sc_a_req_attribute string)
 
-attribute_value := (string)
-
-    
+attribute_value := (string)

もっとも重要なヘッダは content-length だということに 注意してください。コンテナは次のパケットを探すかどうかを、 それを見て決めるからです。

@@ -463,8 +456,7 @@ attribute_value := (string)

レスポンスパケット構造

コンテナがサーバに送り返すことのできるメッセージ:

-
-AJP13_SEND_BODY_CHUNK :=
+    
AJP13_SEND_BODY_CHUNK :=
   prefix_code   3
   chunk_length  (integer)
   chunk        *(byte)
@@ -491,8 +483,7 @@ AJP13_END_RESPONSE :=
 
 AJP13_GET_BODY_CHUNK :=
   prefix_code       6
-  requested_length  (integer)
-    
+ requested_length (integer)

詳細 :

Send Body Chunk

チャンクは基本的にはバイナリデータで、ブラウザに直接送られます。

Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/mod_rewrite.html.en URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/mod_rewrite.html.en?rev=1565268&r1=1565267&r2=1565268&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/docs/manual/mod/mod_rewrite.html.en (original) +++ httpd/httpd/branches/2.2.x/docs/manual/mod/mod_rewrite.html.en Thu Feb 6 14:21:05 2014 @@ -109,12 +109,10 @@ URLs on the fly primarily used to rewrite logical URLs to physical pathnames.

-

Example

-SCRIPT_NAME=/sw/lib/w3s/tree/global/u/rse/.www/index.html
+

Example

SCRIPT_NAME=/sw/lib/w3s/tree/global/u/rse/.www/index.html
 SCRIPT_FILENAME=/u/rse/.www/index.html
 SCRIPT_URL=/u/rse/
-SCRIPT_URI=http://en1.engelschall.com/u/rse/
-
+SCRIPT_URI=http://en1.engelschall.com/u/rse/
top
@@ -172,15 +170,13 @@ SCRIPT_URI=http://en1.engelschall.com/u/ since the resource was not relative to the document root. This misconfiguration would normally cause the server to look for an "opt" directory under the document root.

-
-DocumentRoot /var/www/example.com
+
DocumentRoot /var/www/example.com
 Alias /myapp /opt/myapp-1.2.3
 <Directory /opt/myapp-1.2.3>
 RewriteEngine On
 RewriteBase /myapp/
 RewriteRule ^index\.html$  welcome.html 
-</Directory>
-
+</Directory>
top
@@ -582,12 +578,10 @@ RewriteRule ^index\.html$ welcome.html Use this to combine rule conditions with a local OR instead of the implicit AND. Typical example: -
-RewriteCond %{REMOTE_HOST}  =host1  [OR]
+
RewriteCond %{REMOTE_HOST}  =host1  [OR]
 RewriteCond %{REMOTE_HOST}  =host2  [OR]
 RewriteCond %{REMOTE_HOST}  =host3
-RewriteRule ...some special stuff for any of these hosts...
-
+RewriteRule ...some special stuff for any of these hosts...
Without this flag you would have to write the condition/rule pair three times. @@ -612,15 +606,13 @@ RewriteRule ...some special stuff for an ``User-Agent:'' header of the request, you can use the following:

-
-RewriteCond  %{HTTP_USER_AGENT}  ^Mozilla
+
RewriteCond  %{HTTP_USER_AGENT}  ^Mozilla
 RewriteRule  ^/$                 /homepage.max.html  [L]
 
 RewriteCond  %{HTTP_USER_AGENT}  ^Lynx
 RewriteRule  ^/$                 /homepage.min.html  [L]
 
-RewriteRule  ^/$                 /homepage.std.html  [L]
-
+RewriteRule ^/$ /homepage.std.html [L]

Explanation: If you use a browser which identifies itself as 'Mozilla' (including Netscape Navigator, Mozilla etc), then you @@ -854,14 +846,12 @@ Apache 2.0.41 and later SubstValue

-

Example

-##
+

Example

##
 ##  map.txt -- rewriting map
 ##
 
 Ralf.S.Engelschall    rse   # Bastard Operator From Hell
-Mr.Joe.Average        joe   # Mr. Average
-
+Mr.Joe.Average joe # Mr. Average

RewriteMap real-to-user txt:/path/to/file/map.txt @@ -886,14 +876,12 @@ RewriteMap real-to-user txt:/path/to/fil else is sent to one of the 'dynamic' pool.

Example:

-

Rewrite map file

-##
+

Rewrite map file

##
 ##  map.txt -- rewriting map
 ##
 
 static   www1|www2|www3|www4
-dynamic  www5|www6
-
+dynamic www5|www6

Configuration directives

RewriteMap servers rnd:/path/to/file/map.txt
@@ -981,14 +969,12 @@ $ httxt2dbm -i mapfile.txt -o mapfile.ma context that does not have RewriteEngine set to on

. -
-#!/usr/bin/perl
+
#!/usr/bin/perl
 $| = 1;
 while (<STDIN>) {
     # ...put here any transformations or lookups...
     print $_;
-}
-
+}

But be very careful:

@@ -1470,8 +1456,7 @@ directive.

(the [R] flag is redundant) ^/somepath(.*) http://otherhost/otherpath$1 [P] http://otherhost/otherpath/pathinfo - via internal proxy -
+ via internal proxy

Inside per-directory configuration for /somepath
@@ -1513,8 +1498,7 @@ directive.

(the [R] flag is redundant) ^localpath(.*) http://otherhost/otherpath$1 [P] http://otherhost/otherpath/pathinfo - via internal proxy -
+ via internal proxy
Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/mod_rewrite.html.fr URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/mod_rewrite.html.fr?rev=1565268&r1=1565267&r2=1565268&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/docs/manual/mod/mod_rewrite.html.fr (original) +++ httpd/httpd/branches/2.2.x/docs/manual/mod/mod_rewrite.html.fr Thu Feb 6 14:21:05 2014 @@ -116,12 +116,10 @@ d'Apache le savoir car le processus de réécriture est principalement utilisé pour réécrire des URLs logiques en chemins physiques.

-

Exemple

-SCRIPT_NAME=/sw/lib/w3s/tree/global/u/rse/.www/index.html
+

Exemple

SCRIPT_NAME=/sw/lib/w3s/tree/global/u/rse/.www/index.html
 SCRIPT_FILENAME=/u/rse/.www/index.html
 SCRIPT_URL=/u/rse/
-SCRIPT_URI=http://en1.engelschall.com/u/rse/
-
+SCRIPT_URI=http://en1.engelschall.com/u/rse/
top
@@ -185,15 +183,13 @@ ressource n'était pas relative à la ra de configuration aurait conduit le serveur à rechercher un répertoire "opt" à la racine des documents.

-
-DocumentRoot /var/www/example.com
+
DocumentRoot /var/www/example.com
 Alias /myapp /opt/myapp-1.2.3
 <Directory /opt/myapp-1.2.3>
 RewriteEngine On
 RewriteBase /myapp/
 RewriteRule ^index\.html$  welcome.html 
-</Directory>
-
+</Directory>
top
@@ -616,12 +612,10 @@ la réécriture soit effectuée Permet de chaîner les conditions de règles avec un OU au lieu du AND implicite. Exemple typique : -
-RewriteCond %{REMOTE_HOST}  ^hote1  [OR]
+
RewriteCond %{REMOTE_HOST}  ^hote1  [OR]
 RewriteCond %{REMOTE_HOST}  ^hote2  [OR]
 RewriteCond %{REMOTE_HOST}  ^hote3
-RewriteRule ...règles concernant tous ces hôtes...
-
+RewriteRule ...règles concernant tous ces hôtes...
Sans ce drapeau, les paires condition/règle devraient être écrites trois fois. @@ -647,15 +641,13 @@ RewriteRule ...règles concernant tous c l'en-tête ``User-Agent:'' de la requête, vous pouvez utiliser ce qui suit :

-
-RewriteCond  %{HTTP_USER_AGENT}  ^Mozilla
+
RewriteCond  %{HTTP_USER_AGENT}  ^Mozilla
 RewriteRule  ^/$                 /homepage.max.html  [L]
 
 RewriteCond  %{HTTP_USER_AGENT}  ^Lynx
 RewriteRule  ^/$                 /homepage.min.html  [L]
 
-RewriteRule  ^/$                 /homepage.std.html  [L]
-
+RewriteRule ^/$ /homepage.std.html [L]

Explications : si vous utilisez un navigateur (Netscape Navigator, Mozilla etc) qui s'identifie comme @@ -917,15 +909,13 @@ bases de données depuis la version 2.0. valeur de remplacement

-

Exemple

-##
+

Exemple

##
 ##  map.txt -- table de correspondance pour la réécriture
 ##
 
 Ralf.S.Engelschall    rse   # Bastard Operator From Hell
 (traduction à votre convenance)
-Mr.Joe.Average        joe   # Mr. Average
-
+Mr.Joe.Average joe # Mr. Average

RewriteMap real-to-user txt:/chemin/vers/fichier/map.txt @@ -955,14 +945,12 @@ RewriteMap real-to-user txt:/chemin/vers "dynamique".

Exemple:

-

Fichier de correspondances pour la réécriture

-##
+

Fichier de correspondances pour la réécriture

##
 ##  map.txt -- correspondances pour la réécriture
 ##
 
 static   www1|www2|www3|www4
-dynamic  www5|www6
-
+dynamic www5|www6

Directives de configuration

RewriteMap serveurs rnd:/chemin/vers/fichier/map.txt
@@ -1063,14 +1051,12 @@ $ httxt2dbm -i fichier-source.txt -o fic RewriteEngine n'a pas été définie à on.

-
-#!/usr/bin/perl
+
#!/usr/bin/perl
 $| = 1;
 while (<STDIN>) {
     # ...insérer ici le code de transformation ou de recherche...
     print $_;
-}
-
+}

Mais soyez très prudent :

@@ -1614,8 +1600,7 @@ utilisé dans la directive
+ via un mandataire interne
Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/mod_ssl.html.en URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/mod_ssl.html.en?rev=1565268&r1=1565267&r2=1565268&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/docs/manual/mod/mod_ssl.html.en (original) +++ httpd/httpd/branches/2.2.x/docs/manual/mod/mod_ssl.html.en Thu Feb 6 14:21:05 2014 @@ -537,16 +537,14 @@ authenticate, i.e. for SSL only the Anon use ciphers using RC4 and RSA. Next include the high, medium and then the low security ciphers. Finally pull all SSLv2 and export ciphers to the end of the list.

-
-$ openssl ciphers -v 'ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP'
+
$ openssl ciphers -v 'ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP'
 NULL-SHA                SSLv3 Kx=RSA      Au=RSA  Enc=None      Mac=SHA1
 NULL-MD5                SSLv3 Kx=RSA      Au=RSA  Enc=None      Mac=MD5
 EDH-RSA-DES-CBC3-SHA    SSLv3 Kx=DH       Au=RSA  Enc=3DES(168) Mac=SHA1
 ...                     ...               ...     ...           ...
 EXP-RC4-MD5             SSLv3 Kx=RSA(512) Au=RSA  Enc=RC4(40)   Mac=MD5  export
 EXP-RC2-CBC-MD5         SSLv2 Kx=RSA(512) Au=RSA  Enc=RC2(40)   Mac=MD5  export
-EXP-RC4-MD5             SSLv2 Kx=RSA(512) Au=RSA  Enc=RC4(40)   Mac=MD5  export
-
+EXP-RC4-MD5 SSLv2 Kx=RSA(512) Au=RSA Enc=RC4(40) Mac=MD5 export

The complete list of particular RSA & DH ciphers for SSL is given in Table 2.

Example

SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW @@ -1585,8 +1583,7 @@ containing any number of access checks.< The expression must match the following syntax (given as a BNF grammar notation):

-
-expr     ::= "true" | "false"
+
expr     ::= "true" | "false"
            | "!" expr
            | expr "&&" expr
            | expr "||" expr
@@ -1615,8 +1612,7 @@ word     ::= digit
 digit    ::= [0-9]+
 cstring  ::= "..."
 variable ::= "%{" varname "}"
-function ::= funcname "(" funcargs ")"
-
+function ::= funcname "(" funcargs ")"

while for varname any variable from Table 3 can be used. Finally for funcname the following functions are available:

@@ -1649,8 +1645,7 @@ checked, until a match is found.

Standard CGI/1.0 and Apache variables:

-
-HTTP_USER_AGENT        PATH_INFO             AUTH_TYPE
+
HTTP_USER_AGENT        PATH_INFO             AUTH_TYPE
 HTTP_REFERER           QUERY_STRING          SERVER_SOFTWARE
 HTTP_COOKIE            REMOTE_HOST           API_VERSION
 HTTP_FORWARDED         REMOTE_IDENT          TIME_YEAR
@@ -1662,11 +1657,9 @@ THE_REQUEST            SERVER_PORT      
 REQUEST_METHOD         SERVER_PROTOCOL       TIME_WDAY
 REQUEST_SCHEME         REMOTE_ADDR           TIME
 REQUEST_URI            REMOTE_USER           ENV:variablename
-REQUEST_FILENAME
-
+REQUEST_FILENAME

SSL-related variables:

-
-HTTPS                  SSL_CLIENT_M_VERSION   SSL_SERVER_M_VERSION
+
HTTPS                  SSL_CLIENT_M_VERSION   SSL_SERVER_M_VERSION
                        SSL_CLIENT_M_SERIAL    SSL_SERVER_M_SERIAL
 SSL_PROTOCOL           SSL_CLIENT_V_START     SSL_SERVER_V_START
 SSL_SESSION_ID         SSL_CLIENT_V_END       SSL_SERVER_V_END
@@ -1702,8 +1695,7 @@ SSL_VERSION_INTERFACE  SSL_CLIENT_S_DN_O
                        SSL_CLIENT_A_KEY       SSL_SERVER_A_KEY
                        SSL_CLIENT_CERT        SSL_SERVER_CERT
                        SSL_CLIENT_CERT_CHAIN_n
-                       SSL_CLIENT_VERIFY      SSL_TLS_SNI
-
+ SSL_CLIENT_VERIFY SSL_TLS_SNI
top