]> granicus.if.org Git - apache/commitdiff
Related to httpd-doc bug 53530; uniform use of quotation marks.
authorKen Coar <coar@apache.org>
Tue, 14 Apr 2015 22:02:22 +0000 (22:02 +0000)
committerKen Coar <coar@apache.org>
Tue, 14 Apr 2015 22:02:22 +0000 (22:02 +0000)
Put quotation marks around most arbitrary-text or filesystem
strings for directives:
 * {Alias,Redirect,Proxy*}{,Match}
 * <{Directory,Files,Location}{,Match}>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1673563 13f79535-47bb-0310-9956-ffa450edef68

86 files changed:
docs/manual/developer/modguide.xml
docs/manual/dns-caveats.xml
docs/manual/env.xml
docs/manual/expr.xml
docs/manual/handler.xml
docs/manual/howto/access.xml
docs/manual/howto/auth.xml
docs/manual/howto/cgi.xml
docs/manual/howto/htaccess.xml
docs/manual/howto/public_html.xml
docs/manual/misc/perf-tuning.xml
docs/manual/misc/security_tips.xml
docs/manual/mod/core.html.en
docs/manual/mod/core.xml
docs/manual/mod/mod_access_compat.xml
docs/manual/mod/mod_actions.xml
docs/manual/mod/mod_alias.xml
docs/manual/mod/mod_allowmethods.xml
docs/manual/mod/mod_auth_basic.xml
docs/manual/mod/mod_auth_digest.xml
docs/manual/mod/mod_auth_form.xml
docs/manual/mod/mod_authn_anon.xml
docs/manual/mod/mod_authn_core.xml
docs/manual/mod/mod_authn_dbd.xml
docs/manual/mod/mod_authn_socache.xml
docs/manual/mod/mod_authnz_fcgi.xml
docs/manual/mod/mod_authnz_ldap.xml
docs/manual/mod/mod_authz_core.xml
docs/manual/mod/mod_authz_dbd.xml
docs/manual/mod/mod_authz_dbm.xml
docs/manual/mod/mod_authz_owner.xml
docs/manual/mod/mod_autoindex.xml
docs/manual/mod/mod_cache.xml
docs/manual/mod/mod_charset_lite.xml
docs/manual/mod/mod_data.xml
docs/manual/mod/mod_dav.xml
docs/manual/mod/mod_dav_fs.xml
docs/manual/mod/mod_deflate.xml
docs/manual/mod/mod_dialup.xml
docs/manual/mod/mod_dir.html.en
docs/manual/mod/mod_dir.xml
docs/manual/mod/mod_example_hooks.xml
docs/manual/mod/mod_ext_filter.xml
docs/manual/mod/mod_filter.xml
docs/manual/mod/mod_info.xml
docs/manual/mod/mod_ldap.xml
docs/manual/mod/mod_log_config.xml
docs/manual/mod/mod_log_debug.xml
docs/manual/mod/mod_lua.xml
docs/manual/mod/mod_macro.xml
docs/manual/mod/mod_mime.xml
docs/manual/mod/mod_proxy.xml
docs/manual/mod/mod_proxy_ajp.xml
docs/manual/mod/mod_proxy_balancer.xml
docs/manual/mod/mod_proxy_express.xml
docs/manual/mod/mod_proxy_fcgi.xml
docs/manual/mod/mod_proxy_scgi.xml
docs/manual/mod/mod_proxy_wstunnel.xml
docs/manual/mod/mod_ratelimit.xml
docs/manual/mod/mod_reflector.xml
docs/manual/mod/mod_rewrite.xml
docs/manual/mod/mod_session.xml
docs/manual/mod/mod_speling.xml
docs/manual/mod/mod_ssl.xml
docs/manual/mod/mod_status.xml
docs/manual/mod/mod_substitute.xml
docs/manual/mod/mod_vhost_alias.xml
docs/manual/platform/windows.xml
docs/manual/rewrite/access.xml
docs/manual/rewrite/advanced.xml
docs/manual/rewrite/avoid.xml
docs/manual/rewrite/flags.xml
docs/manual/rewrite/intro.xml
docs/manual/rewrite/proxy.xml
docs/manual/rewrite/remapping.xml
docs/manual/rewrite/rewritemap.xml
docs/manual/rewrite/tech.xml
docs/manual/rewrite/vhosts.xml
docs/manual/sections.xml
docs/manual/ssl/ssl_faq.xml
docs/manual/ssl/ssl_howto.xml
docs/manual/urlmapping.xml
docs/manual/vhosts/examples.xml
docs/manual/vhosts/ip-based.xml
docs/manual/vhosts/mass.xml
docs/manual/vhosts/name-based.xml

index 28c8242402df82a735a5de5065f37917b082b3be..5b4a4dd0891567761444dad639c017ab68971893 100644 (file)
@@ -337,22 +337,22 @@ Let's try out some of these variables in another example handler:<br/>
 static int example_handler(request_rec *r)
 {
     /* Set the appropriate content type */
-    ap_set_content_type(r, &quot;text/html&quot;);
+    ap_set_content_type(r, "text/html");
 
     /* Print out the IP address of the client connecting to us: */
-    ap_rprintf(r, &quot;&lt;h2&gt;Hello, %s!&lt;/h2&gt;&quot;, r-&gt;useragent_ip);
+    ap_rprintf(r, "&lt;h2&gt;Hello, %s!&lt;/h2&gt;", r-&gt;useragent_ip);
     
     /* If we were reached through a GET or a POST request, be happy, else sad. */
-    if ( !strcmp(r-&gt;method, &quot;POST&quot;) || !strcmp(r-&gt;method, &quot;GET&quot;) ) {
-        ap_rputs(&quot;You used a GET or a POST method, that makes us happy!&lt;br/&gt;&quot;, r);
+    if ( !strcmp(r-&gt;method, "POST") || !strcmp(r-&gt;method, "GET") ) {
+        ap_rputs("You used a GET or a POST method, that makes us happy!&lt;br/&gt;", r);
     }
     else {
-        ap_rputs(&quot;You did not use POST or GET, that makes us sad :(&lt;br/&gt;&quot;, r);
+        ap_rputs("You did not use POST or GET, that makes us sad :(&lt;br/&gt;", r);
     }
 
     /* Lastly, if there was a query string, let's print that too! */
     if (r-&gt;args) {
-        ap_rprintf(r, &quot;Your query string was: %s&quot;, r-&gt;args);
+        ap_rprintf(r, "Your query string was: %s", r-&gt;args);
     }
     return OK;
 }
@@ -611,8 +611,8 @@ static int example_handler(request_rec *r)
     const char *digestType;
     
     
-    /* Check that the &quot;example-handler&quot; handler is being called. */
-    if (!r-&gt;handler || strcmp(r-&gt;handler, &quot;example-handler&quot;)) return (DECLINED);
+    /* Check that the "example-handler" handler is being called. */
+    if (!r-&gt;handler || strcmp(r-&gt;handler, "example-handler")) return (DECLINED);
     
     /* Figure out which file is being requested by removing the .sum from it */
     filename = apr_pstrdup(r-&gt;pool, r-&gt;filename);
@@ -637,22 +637,22 @@ static int example_handler(request_rec *r)
     ap_parse_form_data(r, NULL, &amp;POST, -1, 8192);
     
     /* Set the appropriate content type */
-    ap_set_content_type(r, &quot;text/html&quot;);
+    ap_set_content_type(r, "text/html");
     
     /* Print a title and some general information */
-    ap_rprintf(r, &quot;&lt;h2&gt;Information on %s:&lt;/h2&gt;&quot;, filename);
-    ap_rprintf(r, &quot;&lt;b&gt;Size:&lt;/b&gt; %u bytes&lt;br/&gt;&quot;, finfo.size);
+    ap_rprintf(r, "&lt;h2&gt;Information on %s:&lt;/h2&gt;", filename);
+    ap_rprintf(r, "&lt;b&gt;Size:&lt;/b&gt; %u bytes&lt;br/&gt;", finfo.size);
     
     /* Get the digest type the client wants to see */
-    digestType = apr_table_get(GET, &quot;digest&quot;);
-    if (!digestType) digestType = &quot;MD5&quot;;
+    digestType = apr_table_get(GET, "digest");
+    if (!digestType) digestType = "MD5";
     
     
     rc = apr_file_open(&amp;file, filename, APR_READ, APR_OS_DEFAULT, r-&gt;pool);
     if (rc == APR_SUCCESS) {
         
         /* Are we trying to calculate the MD5 or the SHA1 digest? */
-        if (!strcasecmp(digestType, &quot;md5&quot;)) {
+        if (!strcasecmp(digestType, "md5")) {
             /* Calculate the MD5 sum of the file */
             union {
                 char      chr[16];
@@ -667,13 +667,13 @@ static int example_handler(request_rec *r)
             apr_md5_final(digest.chr, &amp;md5);
             
             /* Print out the MD5 digest */
-            ap_rputs(&quot;&lt;b&gt;MD5: &lt;/b&gt;&lt;code&gt;&quot;, r);
+            ap_rputs("&lt;b&gt;MD5: &lt;/b&gt;&lt;code&gt;", r);
             for (n = 0; n &lt; APR_MD5_DIGESTSIZE/4; n++) {
-                ap_rprintf(r, &quot;%08x&quot;, digest.num[n]);
+                ap_rprintf(r, "%08x", digest.num[n]);
             }
-            ap_rputs(&quot;&lt;/code&gt;&quot;, r);
+            ap_rputs("&lt;/code&gt;", r);
             /* Print a link to the SHA1 version */
-            ap_rputs(&quot;&lt;br/&gt;&lt;a href='?digest=sha1'&gt;View the SHA1 hash instead&lt;/a&gt;&quot;, r);
+            ap_rputs("&lt;br/&gt;&lt;a href='?digest=sha1'&gt;View the SHA1 hash instead&lt;/a&gt;", r);
         }
         else {
             /* Calculate the SHA1 sum of the file */
@@ -690,14 +690,14 @@ static int example_handler(request_rec *r)
             apr_sha1_final(digest.chr, &amp;sha1);
             
             /* Print out the SHA1 digest */
-            ap_rputs(&quot;&lt;b&gt;SHA1: &lt;/b&gt;&lt;code&gt;&quot;, r);
+            ap_rputs("&lt;b&gt;SHA1: &lt;/b&gt;&lt;code&gt;", r);
             for (n = 0; n &lt; APR_SHA1_DIGESTSIZE/4; n++) {
-                ap_rprintf(r, &quot;%08x&quot;, digest.num[n]);
+                ap_rprintf(r, "%08x", digest.num[n]);
             }
-            ap_rputs(&quot;&lt;/code&gt;&quot;, r);
+            ap_rputs("&lt;/code&gt;", r);
             
             /* Print a link to the MD5 version */
-            ap_rputs(&quot;&lt;br/&gt;&lt;a href='?digest=md5'&gt;View the MD5 hash instead&lt;/a&gt;&quot;, r);
+            ap_rputs("&lt;br/&gt;&lt;a href='?digest=md5'&gt;View the MD5 hash instead&lt;/a&gt;", r);
         }
         apr_file_close(file);
         
@@ -735,8 +735,8 @@ these directives control how <code>mod_rewrite</code> works:
 </p>
 <highlight language="config">
 RewriteEngine On
-RewriteCond %{REQUEST_URI} ^/foo/bar
-RewriteRule ^/foo/bar/(.*)$ /foobar?page=$1
+RewriteCond "%{REQUEST_URI}" "^/foo/bar"
+RewriteRule "^/foo/bar/(.*)$" "/foobar?page=$1"
 </highlight>
 <p>
 Each of these configuration directives are handled by a separate function, 
@@ -776,18 +776,18 @@ static example_config config;
 
 static int example_handler(request_rec *r)
 {
-    if (!r-&gt;handler || strcmp(r-&gt;handler, &quot;example-handler&quot;)) return(DECLINED);
-    ap_set_content_type(r, &quot;text/plain&quot;);
-    ap_rprintf(r, &quot;Enabled: %u\n&quot;, config.enabled);
-    ap_rprintf(r, &quot;Path: %s\n&quot;, config.path);
-    ap_rprintf(r, &quot;TypeOfAction: %x\n&quot;, config.typeOfAction);
+    if (!r-&gt;handler || strcmp(r-&gt;handler, "example-handler")) return(DECLINED);
+    ap_set_content_type(r, "text/plain");
+    ap_rprintf(r, "Enabled: %u\n", config.enabled);
+    ap_rprintf(r, "Path: %s\n", config.path);
+    ap_rprintf(r, "TypeOfAction: %x\n", config.typeOfAction);
     return OK;
 }
 
 static void register_hooks(apr_pool_t *pool) 
 {
     config.enabled = 1;
-    config.path = &quot;/foo/bar&quot;;
+    config.path = "/foo/bar";
     config.typeOfAction = 0x00;
     ap_hook_handler(example_handler, NULL, NULL, APR_HOOK_LAST);
 }
@@ -812,7 +812,7 @@ So far so good. To access our new handler, we could add the following to
 our configuration:
 </p>
 <highlight language="config">
-&lt;Location /example&gt;
+&lt;Location "/example"&gt;
     SetHandler example-handler
 &lt;/Location&gt;
 </highlight>
@@ -972,30 +972,30 @@ static example_config config;
  Our directive handlers:
  ==============================================================================
  */
-/* Handler for the &quot;exampleEnabled&quot; directive */
+/* Handler for the "exampleEnabled" directive */
 const char *example_set_enabled(cmd_parms *cmd, void *cfg, const char *arg)
 {
-    if(!strcasecmp(arg, &quot;on&quot;)) config.enabled = 1;
+    if(!strcasecmp(arg, "on")) config.enabled = 1;
     else config.enabled = 0;
     return NULL;
 }
 
-/* Handler for the &quot;examplePath&quot; directive */
+/* Handler for the "examplePath" directive */
 const char *example_set_path(cmd_parms *cmd, void *cfg, const char *arg)
 {
     config.path = arg;
     return NULL;
 }
 
-/* Handler for the &quot;exampleAction&quot; directive */
+/* Handler for the "exampleAction" directive */
 /* Let's pretend this one takes one argument (file or db), and a second (deny or allow), */
 /* and we store it in a bit-wise manner. */
 const char *example_set_action(cmd_parms *cmd, void *cfg, const char *arg1, const char *arg2)
 {
-    if(!strcasecmp(arg1, &quot;file&quot;)) config.typeOfAction = 0x01;
+    if(!strcasecmp(arg1, "file")) config.typeOfAction = 0x01;
     else config.typeOfAction = 0x02;
     
-    if(!strcasecmp(arg2, &quot;deny&quot;)) config.typeOfAction += 0x10;
+    if(!strcasecmp(arg2, "deny")) config.typeOfAction += 0x10;
     else config.typeOfAction += 0x20;
     return NULL;
 }
@@ -1007,9 +1007,9 @@ const char *example_set_action(cmd_parms *cmd, void *cfg, const char *arg1, cons
  */
 static const command_rec        example_directives[] =
 {
-    AP_INIT_TAKE1(&quot;exampleEnabled&quot;, example_set_enabled, NULL, RSRC_CONF, &quot;Enable or disable mod_example&quot;),
-    AP_INIT_TAKE1(&quot;examplePath&quot;, example_set_path, NULL, RSRC_CONF, &quot;The path to whatever&quot;),
-    AP_INIT_TAKE2(&quot;exampleAction&quot;, example_set_action, NULL, RSRC_CONF, &quot;Special action value!&quot;),
+    AP_INIT_TAKE1("exampleEnabled", example_set_enabled, NULL, RSRC_CONF, "Enable or disable mod_example"),
+    AP_INIT_TAKE1("examplePath", example_set_path, NULL, RSRC_CONF, "The path to whatever"),
+    AP_INIT_TAKE2("exampleAction", example_set_action, NULL, RSRC_CONF, "Special action value!"),
     { NULL }
 };
 /*
@@ -1019,11 +1019,11 @@ static const command_rec        example_directives[] =
  */
 static int example_handler(request_rec *r)
 {
-    if(!r-&gt;handler || strcmp(r-&gt;handler, &quot;example-handler&quot;)) return(DECLINED);
-    ap_set_content_type(r, &quot;text/plain&quot;);
-    ap_rprintf(r, &quot;Enabled: %u\n&quot;, config.enabled);
-    ap_rprintf(r, &quot;Path: %s\n&quot;, config.path);
-    ap_rprintf(r, &quot;TypeOfAction: %x\n&quot;, config.typeOfAction);
+    if(!r-&gt;handler || strcmp(r-&gt;handler, "example-handler")) return(DECLINED);
+    ap_set_content_type(r, "text/plain");
+    ap_rprintf(r, "Enabled: %u\n", config.enabled);
+    ap_rprintf(r, "Path: %s\n", config.path);
+    ap_rprintf(r, "TypeOfAction: %x\n", config.typeOfAction);
     return OK;
 }
 
@@ -1035,7 +1035,7 @@ static int example_handler(request_rec *r)
 static void register_hooks(apr_pool_t *pool) 
 {
     config.enabled = 1;
-    config.path = &quot;/foo/bar&quot;;
+    config.path = "/foo/bar";
     config.typeOfAction = 3;
     ap_hook_handler(example_handler, NULL, NULL, APR_HOOK_LAST);
 }
@@ -1086,12 +1086,12 @@ within which modules must operate. For example, let's assume you have this
 configuration set up for mod_rewrite:
 </p>
 <highlight language="config">
-&lt;Directory &quot;/var/www&quot;&gt;
-    RewriteCond %{HTTP_HOST} ^example.com$
-    RewriteRule (.*) http://www.example.com/$1
+&lt;Directory "/var/www"&gt;
+    RewriteCond "%{HTTP_HOST}" "^example.com$"
+    RewriteRule "(.*)" "http://www.example.com/$1"
 &lt;/Directory&gt;
-&lt;Directory &quot;/var/www/sub&quot;&gt;
-    RewriteRule ^foobar$ index.php?foobar=true
+&lt;Directory "/var/www/sub"&gt;
+    RewriteRule "^foobar$" "index.php?foobar=true"
 &lt;/Directory&gt;
 </highlight>
 <p>
@@ -1259,12 +1259,12 @@ configurations. This part of the process particularly applies to scenarios
 where you have a parent configuration and a child, such as the following: 
 </p>
 <highlight language="config">
-&lt;Directory &quot;/var/www&quot;&gt;
+&lt;Directory "/var/www"&gt;
     ExampleEnabled On
-    ExamplePath /foo/bar
+    ExamplePath "/foo/bar"
     ExampleAction file allow
 &lt;/Directory&gt;
-&lt;Directory &quot;/var/www/subdir&quot;&gt;
+&lt;Directory "/var/www/subdir"&gt;
     ExampleAction file deny
 &lt;/Directory&gt;
 </highlight>
@@ -1315,21 +1315,21 @@ context aware. First off, we'll create a configuration that lets us test
 how the module works:
 </p>
 <highlight language="config">
-&lt;Location &quot;/a&quot;&gt;
+&lt;Location "/a"&gt;
     SetHandler example-handler
     ExampleEnabled on
-    ExamplePath &quot;/foo/bar&quot;
+    ExamplePath "/foo/bar"
     ExampleAction file allow
 &lt;/Location&gt;
 
-&lt;Location &quot;/a/b&quot;&gt;
+&lt;Location "/a/b"&gt;
     ExampleAction file deny
     ExampleEnabled off
 &lt;/Location&gt;
 
-&lt;Location &quot;/a/b/c&quot;&gt;
+&lt;Location "/a/b/c"&gt;
     ExampleAction db deny
-    ExamplePath &quot;/foo/bar/baz&quot;
+    ExamplePath "/foo/bar/baz"
     ExampleEnabled on
 &lt;/Location&gt;
 </highlight>
@@ -1395,9 +1395,9 @@ static void   register_hooks(apr_pool_t *pool);
 
 static const command_rec    directives[] =
 {
-    AP_INIT_TAKE1(&quot;exampleEnabled&quot;, example_set_enabled, NULL, ACCESS_CONF, &quot;Enable or disable mod_example&quot;),
-    AP_INIT_TAKE1(&quot;examplePath&quot;, example_set_path, NULL, ACCESS_CONF, &quot;The path to whatever&quot;),
-    AP_INIT_TAKE2(&quot;exampleAction&quot;, example_set_action, NULL, ACCESS_CONF, &quot;Special action value!&quot;),
+    AP_INIT_TAKE1("exampleEnabled", example_set_enabled, NULL, ACCESS_CONF, "Enable or disable mod_example"),
+    AP_INIT_TAKE1("examplePath", example_set_path, NULL, ACCESS_CONF, "The path to whatever"),
+    AP_INIT_TAKE2("exampleAction", example_set_action, NULL, ACCESS_CONF, "Special action value!"),
     { NULL }
 };
 
@@ -1435,23 +1435,23 @@ static void register_hooks(apr_pool_t *pool)
  */
 static int example_handler(request_rec *r)
 {
-    if(!r-&gt;handler || strcmp(r-&gt;handler, &quot;example-handler&quot;)) return(DECLINED);
+    if(!r-&gt;handler || strcmp(r-&gt;handler, "example-handler")) return(DECLINED);
 
     /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
     example_config    *config = (example_config *) ap_get_module_config(r-&gt;per_dir_config, &amp;example_module);
     /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
-    ap_set_content_type(r, &quot;text/plain&quot;);
-    ap_rprintf(r, &quot;Enabled: %u\n&quot;, config-&gt;enabled);
-    ap_rprintf(r, &quot;Path: %s\n&quot;, config-&gt;path);
-    ap_rprintf(r, &quot;TypeOfAction: %x\n&quot;, config-&gt;typeOfAction);
-    ap_rprintf(r, &quot;Context: %s\n&quot;, config-&gt;context);
+    ap_set_content_type(r, "text/plain");
+    ap_rprintf(r, "Enabled: %u\n", config-&gt;enabled);
+    ap_rprintf(r, "Path: %s\n", config-&gt;path);
+    ap_rprintf(r, "TypeOfAction: %x\n", config-&gt;typeOfAction);
+    ap_rprintf(r, "Context: %s\n", config-&gt;context);
     return OK;
 }
 
 /*
  =======================================================================================================================
-    Handler for the &quot;exampleEnabled&quot; directive
+    Handler for the "exampleEnabled" directive
  =======================================================================================================================
  */
 const char *example_set_enabled(cmd_parms *cmd, void *cfg, const char *arg)
@@ -1462,7 +1462,7 @@ const char *example_set_enabled(cmd_parms *cmd, void *cfg, const char *arg)
 
     if(conf)
     {
-        if(!strcasecmp(arg, &quot;on&quot;))
+        if(!strcasecmp(arg, "on"))
             conf-&gt;enabled = 1;
         else
             conf-&gt;enabled = 0;
@@ -1473,7 +1473,7 @@ const char *example_set_enabled(cmd_parms *cmd, void *cfg, const char *arg)
 
 /*
  =======================================================================================================================
-    Handler for the &quot;examplePath&quot; directive
+    Handler for the "examplePath" directive
  =======================================================================================================================
  */
 const char *example_set_path(cmd_parms *cmd, void *cfg, const char *arg)
@@ -1492,7 +1492,7 @@ const char *example_set_path(cmd_parms *cmd, void *cfg, const char *arg)
 
 /*
  =======================================================================================================================
-    Handler for the &quot;exampleAction&quot; directive ;
+    Handler for the "exampleAction" directive ;
     Let's pretend this one takes one argument (file or db), and a second (deny or allow), ;
     and we store it in a bit-wise manner.
  =======================================================================================================================
@@ -1506,11 +1506,11 @@ const char *example_set_action(cmd_parms *cmd, void *cfg, const char *arg1, cons
     if(conf)
     {
         {
-            if(!strcasecmp(arg1, &quot;file&quot;))
+            if(!strcasecmp(arg1, "file"))
                 conf-&gt;typeOfAction = 0x01;
             else
                 conf-&gt;typeOfAction = 0x02;
-            if(!strcasecmp(arg2, &quot;deny&quot;))
+            if(!strcasecmp(arg2, "deny"))
                 conf-&gt;typeOfAction += 0x10;
             else
                 conf-&gt;typeOfAction += 0x20;
@@ -1527,7 +1527,7 @@ const char *example_set_action(cmd_parms *cmd, void *cfg, const char *arg1, cons
  */
 void *create_dir_conf(apr_pool_t *pool, char *context)
 {
-    context = context ? context : &quot;Newly created configuration&quot;;
+    context = context ? context : "Newly created configuration";
 
     /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
     example_config    *cfg = apr_pcalloc(pool, sizeof(example_config));
@@ -1557,7 +1557,7 @@ void *merge_dir_conf(apr_pool_t *pool, void *BASE, void *ADD)
     /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
     example_config    *base = (example_config *) BASE;
     example_config    *add = (example_config *) ADD;
-    example_config    *conf = (example_config *) create_dir_conf(pool, &quot;Merged configuration&quot;);
+    example_config    *conf = (example_config *) create_dir_conf(pool, "Merged configuration");
     /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
     conf-&gt;enabled = (add-&gt;enabled == 0) ? base-&gt;enabled : add-&gt;enabled;
@@ -1634,11 +1634,11 @@ static int example_handler(request_rec *r)
         int i;
         for (i = 0; &amp;formData[i]; i++) {
             if (formData[i].key &amp;&amp; formData[i].value) {
-                ap_rprintf(r, &quot;%s = %s\n&quot;, formData[i].key, formData[i].value);
+                ap_rprintf(r, "%s = %s\n", formData[i].key, formData[i].value);
             } else if (formData[i].key) {
-                ap_rprintf(r, &quot;%s\n&quot;, formData[i].key);
+                ap_rprintf(r, "%s\n", formData[i].key);
             } else if (formData[i].value) {
-                ap_rprintf(r, &quot;= %s\n&quot;, formData[i].value);
+                ap_rprintf(r, "= %s\n", formData[i].value);
             } else {
                 break;
             }
@@ -1668,7 +1668,7 @@ static int example_handler(request_rec *r)
     fields = apr_table_elts(r-&gt;headers_in);
     e = (apr_table_entry_t *) fields-&gt;elts;
     for(i = 0; i &lt; fields-&gt;nelts; i++) {
-        ap_rprintf(r, &quot;%s: %s\n&quot;, e[i].key, e[i].val);
+        ap_rprintf(r, "%s: %s\n", e[i].key, e[i].val);
     }
     return OK;
 }
@@ -1726,7 +1726,7 @@ static int example_handler(request_rec *r)
     /*~~~~~~~~~~~~~~~~*/
 
     if(util_read(r, &amp;buffer, &amp;size) == OK) {
-        ap_rprintf(r, &quot;We read a request body that was %" APR_OFF_T_FMT " bytes long&quot;, size);
+        ap_rprintf(r, "We read a request body that was %" APR_OFF_T_FMT " bytes long", size);
     }
     return OK;
 }
index 2ff924b102888c5197df895e38f4dbbe779eda33..624fd86cb4a7db80461ce330b23fa3e9360c56a5 100644 (file)
@@ -41,7 +41,7 @@
 # This is a misconfiguration example, do not use on your server
 &lt;VirtualHost www.example.dom&gt;
   ServerAdmin webgirl@example.dom
-  DocumentRoot /www/example
+  DocumentRoot "/www/example"
 &lt;/VirtualHost&gt;
     </highlight>
 
@@ -63,7 +63,7 @@
 # This is a misconfiguration example, do not use on your server
 &lt;VirtualHost 192.0.2.1&gt;
   ServerAdmin webgirl@example.dom
-  DocumentRoot /www/example
+  DocumentRoot "/www/example"
 &lt;/VirtualHost&gt;
     </highlight>
 
@@ -82,7 +82,7 @@
 &lt;VirtualHost 192.0.2.1&gt;
   ServerName www.example.dom
   ServerAdmin webgirl@example.dom
-  DocumentRoot /www/example
+  DocumentRoot "/www/example"
 &lt;/VirtualHost&gt;
     </highlight>
   </section>
     <highlight language="config">
 &lt;VirtualHost www.example1.dom&gt;
   ServerAdmin webgirl@example1.dom
-  DocumentRoot /www/example1
+  DocumentRoot "/www/example1"
 &lt;/VirtualHost&gt;
 &lt;VirtualHost www.example2.dom&gt;
   ServerAdmin webguy@example2.dom
-  DocumentRoot /www/example2
+  DocumentRoot "/www/example2"
 &lt;/VirtualHost&gt;
     </highlight>
 
index 5bfefb285f1c56edff72a8f91a415a6a0a3cf32b..d4375cf6888cd617d669e8be2291973cbba3021b 100644 (file)
@@ -526,7 +526,7 @@ CustomLog logs/access_log common env=!image-request
 SetEnvIf Referer "^http://www\.example\.com/" local_referal
 # Allow browsers that do not send Referer info
 SetEnvIf Referer "^$" local_referal
-&lt;Directory /web/images&gt;
+&lt;Directory "/web/images"&gt;
     Require env local_referal
 &lt;/Directory&gt;
         </highlight>
index eed2f0ac4999ee1adfb0168b3a2d8a6cdebe2951..e49313c5fd4457b18b44cedc3e9b1b30a6abee34 100644 (file)
@@ -542,7 +542,7 @@ listfunction ::= listfuncname "<strong>(</strong>" word "<strong>)</strong>"
        <highlight language="config">
 # Compare the host name to example.com and redirect to www.example.com if it matches
 &lt;If "%{HTTP_HOST} == 'example.com'"&gt;
-    Redirect permanent / http://www.example.com/
+    Redirect permanent "/" "http://www.example.com/"
 &lt;/If&gt;
 
 # Force text/plain if requesting a file with the query string contains 'forcetext'
@@ -566,7 +566,7 @@ listfunction ::= listfuncname "<strong>(</strong>" word "<strong>)</strong>"
 &lt;/If&gt;
 
 # Check result of URI mapping by running in Directory context with -f
-&lt;Directory /var/www&gt;
+&lt;Directory "/var/www"&gt;
     AddEncoding x-gzip gz
 &lt;If "-f '%{REQUEST_FILENAME}.unzipme' &amp;&amp; ! %{HTTP:Accept-Encoding} =~ /gzip/"&gt;
       SetOutputFilter INFLATE
index 98dc9599bf1336f546fe22ffd1323c46f944f441..fd37d5603efac718c8d0fd769a073c6250c417d1 100644 (file)
@@ -127,7 +127,7 @@ AddHandler add-footer .html
       filename extensions.</p>
 
       <highlight language="config">
-&lt;Directory /web/htdocs/asis&gt;
+&lt;Directory "/web/htdocs/asis"&gt;
     SetHandler send-as-is
 &lt;/Directory&gt;
       </highlight>
index 3353c91a2b2466894e04f0d3850f12256306eedc..0769292d97a9fd22392620a49a7cb357ecee89cc 100644 (file)
@@ -170,9 +170,9 @@ Require expr %{HTTP_USER_AGENT} != 'BadBot'
 
     <highlight language="config">
 RewriteEngine On
-RewriteCond %{TIME_HOUR} &gt;=20 [OR]
-RewriteCond %{TIME_HOUR} &lt;07
-RewriteRule ^/fridge - [F]
+RewriteCond "%{TIME_HOUR}" "&gt;=20" [OR]
+RewriteCond "%{TIME_HOUR}" "&lt;07"
+RewriteRule "^/fridge" "-" [F]
     </highlight>
 
     <p>This will return a 403 Forbidden response for any request after 8pm
index d6d80f4af4e5a06dc5803a83025c6a49f4351ff0..388e69eee652ce20e97ccf8fee43910f4ed1f21d 100644 (file)
@@ -197,14 +197,14 @@ module from each group.</p>
     following directives, either placed in the file
     <code>/usr/local/apache/htdocs/secret/.htaccess</code>, or
     placed in <code>httpd.conf</code> inside a &lt;Directory
-    /usr/local/apache/htdocs/secret&gt; section.</p>
+    "/usr/local/apache/htdocs/secret"&gt; section.</p>
 
     <highlight language="config">
 AuthType Basic
 AuthName "Restricted Files"
 # (Following line optional)
 AuthBasicProvider file
-AuthUserFile /usr/local/apache/passwd/passwords
+AuthUserFile "/usr/local/apache/passwd/passwords"
 Require user rbowen
     </highlight>
 
@@ -310,8 +310,8 @@ AuthType Basic
 AuthName "By Invitation Only"
 # Optional line:
 AuthBasicProvider file
-AuthUserFile /usr/local/apache/passwd/passwords
-AuthGroupFile /usr/local/apache/passwd/groups
+AuthUserFile "/usr/local/apache/passwd/passwords"
+AuthGroupFile "/usr/local/apache/passwd/groups"
 Require group GroupName
     </highlight>
 
@@ -365,11 +365,11 @@ Require group GroupName
     <p>To select a dbm file rather than a text file, for example:</p>
 
     <highlight language="config">
-&lt;Directory /www/docs/private&gt;
+&lt;Directory "/www/docs/private"&gt;
     AuthName "Private"
     AuthType Basic
     AuthBasicProvider dbm
-    AuthDBMUserFile /www/passwords/passwd.dbm
+    AuthDBMUserFile "/www/passwords/passwd.dbm"
     Require valid-user
 &lt;/Directory&gt;
     </highlight>
@@ -388,11 +388,11 @@ Require group GroupName
     file and LDAP based authentication providers are being used.</p>
 
     <highlight language="config">
-&lt;Directory /www/docs/private&gt;
+&lt;Directory "/www/docs/private"&gt;
     AuthName "Private"
     AuthType Basic
     AuthBasicProvider file ldap
-    AuthUserFile /usr/local/apache/passwd/passwords
+    AuthUserFile "/usr/local/apache/passwd/passwords"
     AuthLDAPURL ldap://ldaphost/o=yourorg
     Require valid-user
 &lt;/Directory&gt;
@@ -412,13 +412,13 @@ Require group GroupName
     authorization as well as LDAP group authorization is being used.</p>
 
     <highlight language="config">
-&lt;Directory /www/docs/private&gt;
+&lt;Directory "/www/docs/private"&gt;
     AuthName "Private"
     AuthType Basic
     AuthBasicProvider file
-    AuthUserFile /usr/local/apache/passwd/passwords
+    AuthUserFile "/usr/local/apache/passwd/passwords"
     AuthLDAPURL ldap://ldaphost/o=yourorg
-    AuthGroupFile /usr/local/apache/passwd/groups
+    AuthGroupFile "/usr/local/apache/passwd/groups"
     Require group GroupName
     Require ldap-group cn=mygroup,o=yourorg
 &lt;/Directory&gt;
index bf6f4dc6c842fdf70cf5fc8ae375a6cea0e95593..c1f97e4dedfd8a90b5271ad40e46499f7b7e929f 100644 (file)
@@ -84,7 +84,7 @@
       directive looks like:</p>
 
       <highlight language="config">
-        ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/
+        ScriptAlias "/cgi-bin/" "/usr/local/apache2/cgi-bin/"
       </highlight>
 
       <p>The example shown is from your default <code>httpd.conf</code>
       directory:</p>
 
       <highlight language="config">
-&lt;Directory /usr/local/apache2/htdocs/somedir&gt;
+&lt;Directory "/usr/local/apache2/htdocs/somedir"&gt;
     Options +ExecCGI
 &lt;/Directory&gt;
       </highlight>
       following configuration.</p>
 
       <highlight language="config">
-&lt;Directory /home/*/public_html&gt;
+&lt;Directory "/home/*/public_html"&gt;
     Options +ExecCGI
     AddHandler cgi-script .cgi
 &lt;/Directory&gt;
       program, you can use the following.</p>
 
       <highlight language="config">
-&lt;Directory /home/*/public_html/cgi-bin&gt;
+&lt;Directory "/home/*/public_html/cgi-bin"&gt;
     Options ExecCGI
     SetHandler cgi-script
 &lt;/Directory&gt;
index 6902decd558e5d3486ac22166bf419afad5958c2..988fe25b4aab9046d077e256020b647f24f1c643 100644 (file)
@@ -77,7 +77,9 @@ changes on a per-directory basis.</p>
       if you would rather call the file <code>.config</code> then you
       can put the following in your server configuration file:</p>
 
-      <highlight language="config">AccessFileName .config</highlight>
+      <highlight language="config">
+AccessFileName ".config"
+      </highlight>
     </note>
 
     <p>In general, <code>.htaccess</code> files use the same syntax as
@@ -209,21 +211,23 @@ changes on a per-directory basis.</p>
     <p>Note that it is completely equivalent to put a <code>.htaccess</code>
     file in a directory <code>/www/htdocs/example</code> containing a
     directive, and to put that same directive in a Directory section
-    <code>&lt;Directory /www/htdocs/example&gt;</code> in your main server
+    <code>&lt;Directory "/www/htdocs/example"&gt;</code> in your main server
     configuration:</p>
 
     <p><code>.htaccess</code> file in <code>/www/htdocs/example</code>:</p>
 
     <example><title>Contents of .htaccess file in
     <code>/www/htdocs/example</code></title>
-    <highlight language="config">AddType text/example .exm</highlight>
+    <highlight language="config">
+AddType text/example ".exm"
+    </highlight>
     </example>
 
     <example><title>Section from your <code>httpd.conf</code>
     file</title>
     <highlight language="config">
-&lt;Directory /www/htdocs/example&gt;
-    AddType text/example .exm
+&lt;Directory "/www/htdocs/example"&gt;
+    AddType text/example ".exm"
 &lt;/Directory&gt;
     </highlight>
     </example>
@@ -237,7 +241,9 @@ changes on a per-directory basis.</p>
     by setting the <directive module="core">AllowOverride</directive>
     directive to <code>none</code>:</p>
 
-    <highlight language="config">AllowOverride None</highlight>
+    <highlight language="config">
+AllowOverride None
+    </highlight>
 </section>
 
 <section id="how"><title>How directives are applied</title>
@@ -258,7 +264,9 @@ changes on a per-directory basis.</p>
     <p>In the directory <code>/www/htdocs/example1</code> we have a
     <code>.htaccess</code> file containing the following:</p>
 
-    <highlight language="config">Options +ExecCGI</highlight>
+    <highlight language="config">
+Options +ExecCGI
+    </highlight>
 
     <p>(Note: you must have "<code>AllowOverride Options</code>" in effect
     to permit the use of the "<directive
@@ -268,7 +276,9 @@ changes on a per-directory basis.</p>
     <p>In the directory <code>/www/htdocs/example1/example2</code> we have
     a <code>.htaccess</code> file containing:</p>
 
-    <highlight language="config">Options Includes</highlight>
+    <highlight language="config">
+Options Includes
+    </highlight>
 
     <p>Because of this second <code>.htaccess</code> file, in the directory
     <code>/www/htdocs/example1/example2</code>, CGI execution is not
@@ -292,11 +302,11 @@ changes on a per-directory basis.</p>
     <code>.htaccess</code> you can use:</p>
 
     <highlight language="config">
-&lt;Directory /www/htdocs&gt;
+&lt;Directory "/www/htdocs"&gt;
     AllowOverride All
 &lt;/Directory&gt;
 
-&lt;Location /&gt;
+&lt;Location "/"&gt;
     Options +IncludesNoExec -ExecCGI<br />
 &lt;/Location&gt;
     </highlight>
@@ -330,8 +340,8 @@ changes on a per-directory basis.</p>
     <highlight language="config">
 AuthType Basic
 AuthName "Password Required"
-AuthUserFile /www/passwords/password.file
-AuthGroupFile /www/passwords/group.file
+AuthUserFile "/www/passwords/password.file"
+AuthGroupFile "/www/passwords/group.file"
 Require group admins
     </highlight>
 
@@ -372,13 +382,13 @@ Consider the following examples:</p>
 
 <highlight language="config">
 # In httpd.conf
-RewriteRule ^/images/(.+)\.jpg /images/$1.png
+RewriteRule "^/images/(.+)\.jpg" "/images/$1.png"
 
 # In .htaccess in root dir
-RewriteRule ^images/(.+)\.jpg images/$1.png
+RewriteRule "^images/(.+)\.jpg" "images/$1.png"
 
 # In .htaccess in images/
-RewriteRule ^(.+)\.jpg $1.png
+RewriteRule "^(.+)\.jpg" "$1.png"
 </highlight>
 
 <p>In a <code>.htaccess</code> in your document directory, the leading
index fbcef0fb7f09715180599abc44790c3815c3b7ab..063501378b0c5cbc3d1c22f383915d5880c14f12 100644 (file)
     cgi-enabled.</p>
 
     <highlight language="config">
-&lt;Directory /home/*/public_html/cgi-bin/&gt;
+&lt;Directory "/home/*/public_html/cgi-bin/"&gt;
     Options ExecCGI
     SetHandler cgi-script
 &lt;/Directory&gt;
index bb44c33a82a93c94690c3781f73995a3c42c5d3a..5429f0b8727f1cc83ea3d19b9c8d7da70d52aea1 100644 (file)
       using these directives, if possible.</p>
 
       <p>Note that it's possible to scope the directives, such as
-      within a <code>&lt;Location /server-status&gt;</code> section.
+      within a <code>&lt;Location "/server-status"&gt;</code> section.
       In this case the DNS lookups are only performed on requests
       matching the criteria. Here's an example which disables lookups
       except for <code>.html</code> and <code>.cgi</code> files:</p>
@@ -176,8 +176,8 @@ HostnameLookups off
       filename component. For example, if you had:</p>
 
       <highlight language="config">
-DocumentRoot /www/htdocs
-&lt;Directory /&gt;
+DocumentRoot "/www/htdocs"
+&lt;Directory "/"&gt;
   Options SymLinksIfOwnerMatch
 &lt;/Directory&gt;
       </highlight>
@@ -191,12 +191,12 @@ DocumentRoot /www/htdocs
       security checking you can do something like this:</p>
 
       <highlight language="config">
-DocumentRoot /www/htdocs
-&lt;Directory /&gt;
+DocumentRoot "/www/htdocs"
+&lt;Directory "/"&gt;
   Options FollowSymLinks
 &lt;/Directory&gt;
 
-&lt;Directory /www/htdocs&gt;
+&lt;Directory "/www/htdocs"&gt;
   Options -FollowSymLinks +SymLinksIfOwnerMatch
 &lt;/Directory&gt;
       </highlight>
@@ -222,8 +222,8 @@ DocumentRoot /www/htdocs
       example,</p>
 
       <highlight language="config">
-DocumentRoot /www/htdocs
-&lt;Directory /&gt;
+DocumentRoot "/www/htdocs"
+&lt;Directory "/"&gt;
   AllowOverride all
 &lt;/Directory&gt;
       </highlight>
index 5664ff9d3ef9e016e317ea753f833b675c4397f9..af003eb889bf323fce9689223d66171d13970f55 100644 (file)
     <p>In the server configuration file, put</p>
 
     <highlight language="config">
-&lt;Directory /&gt;
+&lt;Directory "/"&gt;
     AllowOverride None
 &lt;/Directory&gt;
     </highlight>
     configuration:</p>
 
     <highlight language="config">
-&lt;Directory /&gt;
+&lt;Directory "/"&gt;
     Require all denied
 &lt;/Directory&gt;
     </highlight>
     allow access only in those areas you wish. For example,</p>
 
     <highlight language="config">
-&lt;Directory /usr/users/*/public_html&gt;
+&lt;Directory "/usr/users/*/public_html"&gt;
     Require all granted
 &lt;/Directory&gt;
-&lt;Directory /usr/local/httpd&gt;
+&lt;Directory "/usr/local/httpd"&gt;
     Require all granted
 &lt;/Directory&gt;
     </highlight>
     <p>Pay particular attention to the interactions of <directive
     module="core">Location</directive> and <directive
     module="core">Directory</directive> directives; for instance, even
-    if <code>&lt;Directory /&gt;</code> denies access, a <code>
-    &lt;Location /&gt;</code> directive might overturn it.</p>
+    if <code>&lt;Directory "/"&gt;</code> denies access, a <code>
+    &lt;Location "/"&gt;</code> directive might overturn it.</p>
 
     <p>Also be wary of playing games with the <directive
     module="mod_userdir">UserDir</directive> directive; setting it to
index 922614ffe730db98cf30f0604d024fd7d2b6aad3..84d8afbbf21338149d1a493277134cff1e2e0520 100644 (file)
@@ -291,7 +291,7 @@ AcceptFilter https data</pre>
     <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code>
     for directives, unless they have been disabled with</p>
 
-    <pre class="prettyprint lang-config">&lt;Directory /&gt;
+    <pre class="prettyprint lang-config">&lt;Directory "/"&gt;
     AllowOverride None
 &lt;/Directory&gt;</pre>
 
@@ -527,7 +527,7 @@ NoDecode option available in 2.3.12 and later.</td></tr>
 
     <div class="note"><p>For security and performance reasons, do not set
     <code>AllowOverride</code> to anything other than <code>None</code>
-    in your <code>&lt;Directory /&gt;</code> block. Instead, find (or
+    in your <code>&lt;Directory "/"&gt;</code> block. Instead, find (or
     create) the <code>&lt;Directory&gt;</code> block that refers to the
     directory where you're actually planning to place a
     <code>.htaccess</code> file.</p>
@@ -771,7 +771,7 @@ DocumentRoot /var/www/${servername}/htdocs</pre>
 <table class="directive">
 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose a group of directives that apply only to the
 named file-system directory, sub-directories, and their contents.</td></tr>
-<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Directory <var>directory-path</var>&gt;
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Directory "<var>directory-path</var>"&gt;
 ... &lt;/Directory&gt;</code></td></tr>
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
@@ -788,9 +788,9 @@ named file-system directory, sub-directories, and their contents.</td></tr>
     any single character, and <code>*</code> matches any sequences of
     characters. You may also use <code>[]</code> character ranges. None
     of the wildcards match a `/' character, so <code>&lt;Directory
-    /*/public_html&gt;</code> will not match
+    "/*/public_html"&gt;</code> will not match
     <code>/home/user/public_html</code>, but <code>&lt;Directory
-    /home/*/public_html&gt;</code> will match. Example:</p>
+    "/home/*/public_html"&gt;</code> will match. Example:</p>
 
     <pre class="prettyprint lang-config">&lt;Directory "/usr/local/httpd/htdocs"&gt;
   Options Indexes FollowSymLinks
@@ -824,7 +824,7 @@ named file-system directory, sub-directories, and their contents.</td></tr>
     first, interspersed with the directives from the <a href="#accessfilename">.htaccess</a> files. For example,
     with</p>
 
-    <pre class="prettyprint lang-config">&lt;Directory /&gt;
+    <pre class="prettyprint lang-config">&lt;Directory "/"&gt;
   AllowOverride None
 &lt;/Directory&gt;
 
@@ -866,12 +866,12 @@ named file-system directory, sub-directories, and their contents.</td></tr>
     be applied.</p>
 
    <p><strong>Note that the default access for
-    <code>&lt;Directory /&gt;</code> is to permit all access.
+    <code>&lt;Directory "/"&gt;</code> is to permit all access.
     This means that Apache httpd will serve any file mapped from an URL. It is
     recommended that you change this with a block such
     as</strong></p>
 
-    <pre class="prettyprint lang-config">&lt;Directory /&gt;
+    <pre class="prettyprint lang-config">&lt;Directory "/"&gt;
   Require all denied
 &lt;/Directory&gt;</pre>
 
@@ -897,7 +897,7 @@ named file-system directory, sub-directories, and their contents.</td></tr>
 <table class="directive">
 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose directives that apply to
 the contents of file-system directories matching a regular expression.</td></tr>
-<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;DirectoryMatch <var>regex</var>&gt;
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;DirectoryMatch "<var>regex</var>"&gt;
 ... &lt;/DirectoryMatch&gt;</code></td></tr>
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
@@ -939,7 +939,7 @@ the contents of file-system directories matching a regular expression.</td></tr>
     <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>. In order to prevent confusion, numbered
     (unnamed) backreferences are ignored. Use named groups instead.</p>
 
-<pre class="prettyprint lang-config">&lt;DirectoryMatch ^/var/www/combined/(?&lt;sitename&gt;[^/]+)&gt;
+<pre class="prettyprint lang-config">&lt;DirectoryMatch "^/var/www/combined/(?&lt;sitename&gt;[^/]+)"&gt;
     Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
 &lt;/DirectoryMatch&gt;</pre>
 
@@ -1283,7 +1283,7 @@ ErrorDocument 403 /cgi-bin/forbidden.pl?referrer=%{escape:%{HTTP_REFERER}}</pre>
 
     <pre class="prettyprint lang-config">ErrorDocument 404 /cgi-bin/bad_urls.pl
 
-&lt;Directory /web/docs&gt;
+&lt;Directory "/web/docs"&gt;
   ErrorDocument 404 default
 &lt;/Directory&gt;</pre>
 
@@ -1671,7 +1671,7 @@ earlier.</td></tr>
 <table class="directive">
 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to matched
 filenames</td></tr>
-<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Files <var>filename</var>&gt; ... &lt;/Files&gt;</code></td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Files "<var>filename</var>"&gt; ... &lt;/Files&gt;</code></td></tr>
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
@@ -1732,7 +1732,7 @@ filenames</td></tr>
 <table class="directive">
 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to regular-expression matched
 filenames</td></tr>
-<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;FilesMatch <var>regex</var>&gt; ... &lt;/FilesMatch&gt;</code></td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;FilesMatch "<var>regex</var>"&gt; ... &lt;/FilesMatch&gt;</code></td></tr>
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
@@ -1762,7 +1762,7 @@ filenames</td></tr>
     <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>. In order to prevent confusion, numbered
     (unnamed) backreferences are ignored. Use named groups instead.</p>
 
-<pre class="prettyprint lang-config">&lt;FilesMatch ^(?&lt;sitename&gt;[^/]+)&gt;
+<pre class="prettyprint lang-config">&lt;FilesMatch "^(?&lt;sitename&gt;[^/]+)"&gt;
     require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
 &lt;/FilesMatch&gt;</pre>
 
@@ -1807,12 +1807,12 @@ media type in the HTTP Content-Type header field</td></tr>
     by using the value of <code>None</code>:</p>
 
     <pre class="prettyprint lang-config"># force all files to be image/gif:
-&lt;Location /images&gt;
+&lt;Location "/images"&gt;
   ForceType image/gif
 &lt;/Location&gt;
 
 # but normal mime-type associations here:
-&lt;Location /images/mixed&gt;
+&lt;Location "/images/mixed"&gt;
   ForceType None
 &lt;/Location&gt;</pre>
 
@@ -2558,7 +2558,7 @@ from the client</td></tr>
 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to matching
 URLs</td></tr>
 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Location
-    <var>URL-path</var>|<var>URL</var>&gt; ... &lt;/Location&gt;</code></td></tr>
+    "<var>URL-path</var>|<var>URL</var>"&gt; ... &lt;/Location&gt;</code></td></tr>
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
@@ -2596,7 +2596,7 @@ URLs</td></tr>
     /private1, /private1/ and /private1/file.txt will have the enclosed
     directives applied, but /private1other would not.
     </p>
-    <pre class="prettyprint lang-config">&lt;Location /private1&gt;
+    <pre class="prettyprint lang-config">&lt;Location "/private1"&gt;
     #  ...
 &lt;/Location&gt;</pre>
 
@@ -2605,7 +2605,7 @@ URLs</td></tr>
     /private2/ and /private2/file.txt will have the enclosed
     directives applied, but /private2 and /private2other would not.
     </p>
-    <pre class="prettyprint lang-config">&lt;Location /private2<em>/</em>&gt;
+    <pre class="prettyprint lang-config">&lt;Location "/private2<em>/</em>"&gt;
     # ...
 &lt;/Location&gt;</pre>
 
@@ -2615,7 +2615,7 @@ URLs</td></tr>
     <p>Use <code class="directive">&lt;Location&gt;</code> to apply
     directives to content that lives outside the filesystem.  For
     content that lives in the filesystem, use <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> and <code class="directive"><a href="#files">&lt;Files&gt;</a></code>.  An exception is
-    <code>&lt;Location /&gt;</code>, which is an easy way to
+    <code>&lt;Location "/"&gt;</code>, which is an easy way to
     apply a configuration to the entire server.</p>
     </div>
 
@@ -2651,7 +2651,7 @@ URLs</td></tr>
     directive. For example, to enable status requests, but allow them
     only from browsers at <code>example.com</code>, you might use:</p>
 
-    <pre class="prettyprint lang-config">&lt;Location /status&gt;
+    <pre class="prettyprint lang-config">&lt;Location "/status"&gt;
   SetHandler server-status
   Require host example.com
 &lt;/Location&gt;</pre>
@@ -2667,12 +2667,12 @@ URLs</td></tr>
       directive and the regex version of <code class="directive">&lt;Location&gt;</code> require you to explicitly specify multiple
       slashes if that is your intention.</p>
 
-      <p>For example, <code>&lt;LocationMatch ^/abc&gt;</code> would match
+      <p>For example, <code>&lt;LocationMatch "^/abc"&gt;</code> would match
       the request URL <code>/abc</code> but not the request URL <code>
       //abc</code>. The (non-regex) <code class="directive">&lt;Location&gt;</code> directive behaves similarly when used for
       proxy requests. But when (non-regex) <code class="directive">&lt;Location&gt;</code> is used for non-proxy requests it will
       implicitly match multiple slashes with a single slash. For example,
-      if you specify <code>&lt;Location /abc/def&gt;</code> and the
+      if you specify <code>&lt;Location "/abc/def"&gt;</code> and the
       request is to <code>/abc//def</code> then it will match.</p>
     </div>
 
@@ -2690,7 +2690,7 @@ URLs</td></tr>
 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to regular-expression
 matching URLs</td></tr>
 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;LocationMatch
-    <var>regex</var>&gt; ... &lt;/LocationMatch&gt;</code></td></tr>
+    "<var>regex</var>"&gt; ... &lt;/LocationMatch&gt;</code></td></tr>
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
@@ -2725,7 +2725,7 @@ matching URLs</td></tr>
     <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>. In order to prevent confusion, numbered
     (unnamed) backreferences are ignored. Use named groups instead.</p>
 
-<pre class="prettyprint lang-config">&lt;LocationMatch ^/combined/(?&lt;sitename&gt;[^/]+)&gt;
+<pre class="prettyprint lang-config">&lt;LocationMatch "^/combined/(?&lt;sitename&gt;[^/]+)"&gt;
     require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
 &lt;/LocationMatch&gt;</pre>
 
@@ -4088,7 +4088,7 @@ handler</td></tr>
     <p>You could also use this directive to configure a particular
     handler for files with a particular file extension. For example:</p>
 
-    <pre class="prettyprint lang-config">&lt;FilesMatch \.php$&gt;
+    <pre class="prettyprint lang-config">&lt;FilesMatch "\.php$"&gt;
     SetHandler application/x-httpd-php
 &lt;/FilesMatch&gt;</pre>
 
index fc9076e3256d743a86bbe24a748941ac207de43f..448aee9a47ee55cb39b4b7a6241657ce2e6b256a 100644 (file)
@@ -204,7 +204,7 @@ AcceptFilter https data
     for directives, unless they have been disabled with</p>
 
     <highlight language="config">
-&lt;Directory /&gt;
+&lt;Directory "/"&gt;
     AllowOverride None
 &lt;/Directory&gt;
     </highlight>
@@ -468,7 +468,7 @@ NoDecode option available in 2.3.12 and later.</compatibility>
 
     <note><p>For security and performance reasons, do not set
     <code>AllowOverride</code> to anything other than <code>None</code>
-    in your <code>&lt;Directory /&gt;</code> block. Instead, find (or
+    in your <code>&lt;Directory "/"&gt;</code> block. Instead, find (or
     create) the <code>&lt;Directory&gt;</code> block that refers to the
     directory where you're actually planning to place a
     <code>.htaccess</code> file.</p>
@@ -699,7 +699,7 @@ which no other media type configuration could be found.
   Define SSL
 &lt;/IfDefine&gt;
 
-DocumentRoot /var/www/${servername}/htdocs
+DocumentRoot "/var/www/${servername}/htdocs"
     </highlight>
 
     <p>Variable names may not contain colon ":" characters, to avoid clashes
@@ -711,7 +711,7 @@ DocumentRoot /var/www/${servername}/htdocs
 <name>Directory</name>
 <description>Enclose a group of directives that apply only to the
 named file-system directory, sub-directories, and their contents.</description>
-<syntax>&lt;Directory <var>directory-path</var>&gt;
+<syntax>&lt;Directory "<var>directory-path</var>"&gt;
 ... &lt;/Directory&gt;</syntax>
 <contextlist><context>server config</context><context>virtual host</context>
 </contextlist>
@@ -728,9 +728,9 @@ named file-system directory, sub-directories, and their contents.</description>
     any single character, and <code>*</code> matches any sequences of
     characters. You may also use <code>[]</code> character ranges. None
     of the wildcards match a `/' character, so <code>&lt;Directory
-    /*/public_html&gt;</code> will not match
+    "/*/public_html"&gt;</code> will not match
     <code>/home/user/public_html</code>, but <code>&lt;Directory
-    /home/*/public_html&gt;</code> will match. Example:</p>
+    "/home/*/public_html"&gt;</code> will match. Example:</p>
 
     <highlight language="config">
 &lt;Directory "/usr/local/httpd/htdocs"&gt;
@@ -769,7 +769,7 @@ named file-system directory, sub-directories, and their contents.</description>
     with</p>
 
     <highlight language="config">
-&lt;Directory /&gt;
+&lt;Directory "/"&gt;
   AllowOverride None
 &lt;/Directory&gt;
 
@@ -812,13 +812,13 @@ named file-system directory, sub-directories, and their contents.</description>
     be applied.</p>
 
    <p><strong>Note that the default access for
-    <code>&lt;Directory /&gt;</code> is to permit all access.
+    <code>&lt;Directory "/"&gt;</code> is to permit all access.
     This means that Apache httpd will serve any file mapped from an URL. It is
     recommended that you change this with a block such
     as</strong></p>
 
     <highlight language="config">
-&lt;Directory /&gt;
+&lt;Directory "/"&gt;
   Require all denied
 &lt;/Directory&gt;
     </highlight>
@@ -888,7 +888,7 @@ the contents of file-system directories matching a regular expression.</descript
     (unnamed) backreferences are ignored. Use named groups instead.</p>
 
 <highlight language="config">
-&lt;DirectoryMatch ^/var/www/combined/(?&lt;sitename&gt;[^/]+)&gt;
+&lt;DirectoryMatch "^/var/www/combined/(?&lt;sitename&gt;[^/]+)"&gt;
     Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
 &lt;/DirectoryMatch&gt;
 </highlight>
@@ -907,7 +907,7 @@ sections are combined when a request is received</seealso>
 <description>Directory that forms the main document tree visible
 from the web</description>
 <syntax>DocumentRoot <var>directory-path</var></syntax>
-<default>DocumentRoot /usr/local/apache/htdocs</default>
+<default>DocumentRoot "/usr/local/apache/htdocs"</default>
 <contextlist><context>server config</context><context>virtual host</context>
 </contextlist>
 
@@ -1236,7 +1236,7 @@ ErrorDocument 403 /cgi-bin/forbidden.pl?referrer=%{escape:%{HTTP_REFERER}}
     <highlight language="config">
 ErrorDocument 404 /cgi-bin/bad_urls.pl
 
-&lt;Directory /web/docs&gt;
+&lt;Directory "/web/docs"&gt;
   ErrorDocument 404 default
 &lt;/Directory&gt;
     </highlight>
@@ -1656,7 +1656,7 @@ earlier.</compatibility>
 <name>Files</name>
 <description>Contains directives that apply to matched
 filenames</description>
-<syntax>&lt;Files <var>filename</var>&gt; ... &lt;/Files&gt;</syntax>
+<syntax>&lt;Files "<var>filename</var>"&gt; ... &lt;/Files&gt;</syntax>
 <contextlist><context>server config</context><context>virtual host</context>
 <context>directory</context><context>.htaccess</context>
 </contextlist>
@@ -1757,7 +1757,7 @@ filenames</description>
     (unnamed) backreferences are ignored. Use named groups instead.</p>
 
 <highlight language="config">
-&lt;FilesMatch ^(?&lt;sitename&gt;[^/]+)&gt;
+&lt;FilesMatch "^(?&lt;sitename&gt;[^/]+)"&gt;
     require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
 &lt;/FilesMatch&gt;
 </highlight>
@@ -1800,12 +1800,12 @@ media type in the HTTP Content-Type header field</description>
 
     <highlight language="config">
 # force all files to be image/gif:
-&lt;Location /images&gt;
+&lt;Location "/images"&gt;
   ForceType image/gif
 &lt;/Location&gt;
 
 # but normal mime-type associations here:
-&lt;Location /images/mixed&gt;
+&lt;Location "/images/mixed"&gt;
   ForceType None
 &lt;/Location&gt;
     </highlight>
@@ -2558,7 +2558,7 @@ from the client</description>
 <description>Applies the enclosed directives only to matching
 URLs</description>
 <syntax>&lt;Location
-    <var>URL-path</var>|<var>URL</var>&gt; ... &lt;/Location&gt;</syntax>
+    "<var>URL-path</var>|<var>URL</var>"&gt; ... &lt;/Location&gt;</syntax>
 <contextlist><context>server config</context><context>virtual host</context>
 </contextlist>
 
@@ -2600,7 +2600,7 @@ URLs</description>
     directives applied, but /private1other would not.
     </p>
     <highlight language="config">
-&lt;Location /private1&gt;
+&lt;Location "/private1"&gt;
     #  ...
 &lt;/Location&gt;
     </highlight>
@@ -2610,7 +2610,7 @@ URLs</description>
     directives applied, but /private2 and /private2other would not.
     </p>
     <highlight language="config">
-&lt;Location /private2<em>/</em>&gt;
+&lt;Location "/private2<em>/</em>"&gt;
     # ...
 &lt;/Location&gt;
     </highlight>
@@ -2623,7 +2623,7 @@ URLs</description>
     content that lives in the filesystem, use <directive
     type="section" module="core">Directory</directive> and <directive
     type="section" module="core">Files</directive>.  An exception is
-    <code>&lt;Location /&gt;</code>, which is an easy way to
+    <code>&lt;Location "/"&gt;</code>, which is an easy way to
     apply a configuration to the entire server.</p>
     </note>
 
@@ -2663,7 +2663,7 @@ URLs</description>
     only from browsers at <code>example.com</code>, you might use:</p>
 
     <highlight language="config">
-&lt;Location /status&gt;
+&lt;Location "/status"&gt;
   SetHandler server-status
   Require host example.com
 &lt;/Location&gt;
@@ -2680,14 +2680,14 @@ URLs</description>
       >Location</directive> require you to explicitly specify multiple
       slashes if that is your intention.</p>
 
-      <p>For example, <code>&lt;LocationMatch ^/abc&gt;</code> would match
+      <p>For example, <code>&lt;LocationMatch "^/abc"&gt;</code> would match
       the request URL <code>/abc</code> but not the request URL <code>
       //abc</code>. The (non-regex) <directive type="section"
       >Location</directive> directive behaves similarly when used for
       proxy requests. But when (non-regex) <directive type="section"
       >Location</directive> is used for non-proxy requests it will
       implicitly match multiple slashes with a single slash. For example,
-      if you specify <code>&lt;Location /abc/def&gt;</code> and the
+      if you specify <code>&lt;Location "/abc/def"&gt;</code> and the
       request is to <code>/abc//def</code> then it will match.</p>
     </note>
 </usage>
@@ -2740,7 +2740,7 @@ matching URLs</description>
     (unnamed) backreferences are ignored. Use named groups instead.</p>
 
 <highlight language="config">
-&lt;LocationMatch ^/combined/(?&lt;sitename&gt;[^/]+)&gt;
+&lt;LocationMatch "^/combined/(?&lt;sitename&gt;[^/]+)"&gt;
     require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
 &lt;/LocationMatch&gt;
 </highlight>
@@ -4074,7 +4074,7 @@ handler</description>
     handler for files with a particular file extension. For example:</p>
 
     <highlight language="config">
-&lt;FilesMatch \.php$&gt;
+&lt;FilesMatch "\.php$"&gt;
     SetHandler application/x-httpd-php
 &lt;/FilesMatch&gt;
     </highlight>
@@ -4386,10 +4386,10 @@ hostname or IP address</description>
     <highlight language="config">
 &lt;VirtualHost 10.1.2.3:80&gt;
   ServerAdmin webmaster@host.example.com
-  DocumentRoot /www/docs/host.example.com
+  DocumentRoot "/www/docs/host.example.com"
   ServerName host.example.com
-  ErrorLog logs/host.example.com-error_log
-  TransferLog logs/host.example.com-access_log
+  ErrorLog "logs/host.example.com-error_log"
+  TransferLog "logs/host.example.com-access_log"
 &lt;/VirtualHost&gt;
     </highlight>
 
@@ -4401,10 +4401,10 @@ hostname or IP address</description>
     <highlight language="config">
 &lt;VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80&gt;
   ServerAdmin webmaster@host.example.com
-  DocumentRoot /www/docs/host.example.com
+  DocumentRoot "/www/docs/host.example.com"
   ServerName host.example.com
-  ErrorLog logs/host.example.com-error_log
-  TransferLog logs/host.example.com-access_log
+  ErrorLog "logs/host.example.com-error_log"
+  TransferLog "logs/host.example.com-access_log"
 &lt;/VirtualHost&gt;
     </highlight>
 
index cf974c73ef83399b22234d1d5031440fa446e276..5d5f4cee772c6445a71d3add2092c90d70ed2399 100644 (file)
@@ -198,7 +198,7 @@ Allow from 2001:db8::a00:20ff:fea7:ccea/10
 
     <highlight language="config">
 SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in
-&lt;Directory /docroot&gt;
+&lt;Directory "/docroot"&gt;
     Order Deny,Allow
     Deny from all
     Allow from env=let_me_in
@@ -376,7 +376,7 @@ Deny from foo.example.org
     example,</p>
 
     <highlight language="config">
-&lt;Directory /www&gt;
+&lt;Directory "/www"&gt;
     Order Allow,Deny
 &lt;/Directory&gt;
     </highlight>
@@ -456,11 +456,11 @@ Satisfy Any
     </p>
 
     <highlight language="config">
-&lt;Directory /var/www/private&gt;
+&lt;Directory "/var/www/private"&gt;
     Require valid-user
 &lt;/Directory&gt;
 
-&lt;Directory /var/www/private/public&gt;
+&lt;Directory "/var/www/private/public"&gt;
     Allow from all
     Satisfy Any
 &lt;/Directory&gt;
index 9b295b58ffe20c2a188ac7a9739e06551f371aed..2ce49533ea91a434be07544a7ecc855759278a16 100644 (file)
@@ -88,7 +88,7 @@ Action image/gif /cgi-bin/images.cgi
     <highlight language="config">
 # Files of a particular file extension
 AddHandler my-file-type .xyz
-Action my-file-type /cgi-bin/program.cgi
+Action my-file-type "/cgi-bin/program.cgi"
     </highlight>
     </example>
     <p>In this example, requests for files with a file extension of
@@ -101,9 +101,9 @@ Action my-file-type /cgi-bin/program.cgi
     virtual locations.</p>
 
     <highlight language="config">
-&lt;Location /news&gt;
+&lt;Location "/news"&gt;
     SetHandler news-handler
-    Action news-handler /cgi-bin/news.cgi virtual
+    Action news-handler "/cgi-bin/news.cgi" virtual
 &lt;/Location&gt;
     </highlight>
 </usage>
@@ -147,10 +147,10 @@ method.</description>
 
     <highlight language="config">
 # All GET requests go here
-Script GET /cgi-bin/search
+Script GET "/cgi-bin/search"
 
 # A CGI PUT handler
-Script PUT /~bob/put.cgi
+Script PUT "/~bob/put.cgi"
     </highlight>
 </usage>
 </directivesynopsis>
index b4e2711c046222aaa56e69728c4aa22856f69ab1..015c7de3e6f43dff294e04edf327a5b0b2f000ce 100644 (file)
@@ -48,7 +48,7 @@
     a new location.</p>
 
     <p>When the <directive module="mod_alias">Alias</directive>,
-    <directive module="mod_alias">ScriptAlias</directive> and 
+    <directive module="mod_alias">ScriptAlias</directive> and
     <directive module="mod_alias">Redirect</directive> directives are used
     within a <directive type="section" module="core">Location</directive>
     or <directive type="section" module="core">LocationMatch</directive>
@@ -89,8 +89,8 @@ href="../urlmapping.html">Mapping URLs to the filesystem</a></seealso>
     configuration will work as expected:</p>
 
     <highlight language="config">
-Alias /foo/bar /baz
-Alias /foo /gaq
+Alias "/foo/bar" "/baz"
+Alias "/foo" "/gaq"
     </highlight>
 
     <p>But if the above two directives were reversed in order, the
@@ -100,13 +100,13 @@ Alias /foo /gaq
     ignored.</p>
 
     <p>When the <directive module="mod_alias">Alias</directive>,
-    <directive module="mod_alias">ScriptAlias</directive> and 
+    <directive module="mod_alias">ScriptAlias</directive> and
     <directive module="mod_alias">Redirect</directive> directives are used
     within a <directive type="section" module="core">Location</directive>
     or <directive type="section" module="core">LocationMatch</directive>
     section, these directives will take precedence over any globally
     defined <directive module="mod_alias">Alias</directive>,
-    <directive module="mod_alias">ScriptAlias</directive> and 
+    <directive module="mod_alias">ScriptAlias</directive> and
     <directive module="mod_alias">Redirect</directive> directives.</p>
 
 </section>
@@ -131,7 +131,7 @@ Alias /foo /gaq
     file systems.</p>
 
     <highlight language="config">
-      Alias /image /ftp/pub/image
+      Alias "/image" "/ftp/pub/image"
     </highlight>
 
     <p>A request for <code>http://example.com/image/foo.gif</code> would cause
@@ -146,10 +146,10 @@ Alias /foo /gaq
     order to expand the alias. That is, if you use</p>
 
     <highlight language="config">
-      Alias /icons/ /usr/local/apache/icons/
+      Alias "/icons/" "/usr/local/apache/icons/"
     </highlight>
 
-    <p>then the url <code>/icons</code> will not be aliased, as it lacks
+    <p>then the URL <code>/icons</code> will not be aliased, as it lacks
     that trailing /. Likewise, if you omit the slash on the
     <var>URL-path</var> then you must also omit it from the
     <var>file-path</var>.</p>
@@ -169,13 +169,13 @@ Alias /foo /gaq
     permit access to the target directory.</p>
 
     <highlight language="config">
-Alias /image /ftp/pub/image
-&lt;Directory /ftp/pub/image&gt;
+Alias "/image" "/ftp/pub/image"
+&lt;Directory "/ftp/pub/image"&gt;
     Require all granted
 &lt;/Directory&gt;
     </highlight>
 
-    <p>Any number slashes in the <var>URL-path</var> parameter 
+    <p>Any number slashes in the <var>URL-path</var> parameter
     matches any number of slashes in the requested URL-path.</p>
 
     <p>If the <directive>Alias</directive> directive is used within a
@@ -185,11 +185,11 @@ Alias /image /ftp/pub/image
     using <a href="../expr.html">expression syntax</a>.</p>
 
     <highlight language="config">
-&lt;Location /image&gt;
-    Alias /ftp/pub/image
+&lt;Location "/image"&gt;
+    Alias "/ftp/pub/image"
 &lt;/Location&gt;
-&lt;LocationMatch /error/(?&lt;NUMBER&gt;[0-9]+)&gt;
-    Alias /usr/local/apache/errors/%{env:MATCH_NUMBER}.html
+&lt;LocationMatch "/error/(?&lt;NUMBER&gt;[0-9]+)"&gt;
+    Alias "/usr/local/apache/errors/%{env:MATCH_NUMBER}.html"
 &lt;/LocationMatch&gt;
     </highlight>
 
@@ -217,7 +217,7 @@ expressions</description>
     use:</p>
 
     <highlight language="config">
-      AliasMatch ^/icons(/|$)(.*) /usr/local/apache/icons$1$2
+      AliasMatch "^/icons(/|$)(.*)" "/usr/local/apache/icons$1$2"
     </highlight>
 
     <p>The full range of <glossary ref="regex">regular expression</glossary>
@@ -226,7 +226,7 @@ expressions</description>
     matching of the URL-path:</p>
 
     <highlight language="config">
-      AliasMatch (?i)^/image(.*) /ftp/pub/image$1
+      AliasMatch "(?i)^/image(.*)" "/ftp/pub/image$1"
     </highlight>
 
     <p>One subtle difference
@@ -251,20 +251,20 @@ expressions</description>
     <p>For example, suppose you want to replace this with AliasMatch:</p>
 
     <highlight language="config">
-      Alias /image/ /ftp/pub/image/
+      Alias "/image/" "/ftp/pub/image/"
     </highlight>
 
     <p>This is NOT equivalent - don't do this!  This will send all
     requests that have /image/ anywhere in them to /ftp/pub/image/:</p>
 
     <highlight language="config">
-      AliasMatch /image/ /ftp/pub/image/
+      AliasMatch "/image/" "/ftp/pub/image/"
     </highlight>
 
     <p>This is what you need to get the same effect:</p>
 
     <highlight language="config">
-      AliasMatch ^/image/(.*)$ /ftp/pub/image/$1
+      AliasMatch "^/image/(.*)$" "/ftp/pub/image/$1"
     </highlight>
 
     <p>Of course, there's no point in
@@ -275,8 +275,8 @@ expressions</description>
     serve different kinds of files from different directories:</p>
 
     <highlight language="config">
-      AliasMatch ^/image/(.*)\.jpg$ /files/jpg.images/$1.jpg<br/>
-      AliasMatch ^/image/(.*)\.gif$ /files/gif.images/$1.gif
+      AliasMatch "^/image/(.*)\.jpg$" "/files/jpg.images/$1.jpg"<br/>
+      AliasMatch "^/image/(.*)\.gif$" "/files/gif.images/$1.gif"
     </highlight>
 
     <p>Multiple leading slashes in the requested URL are discarded
@@ -316,10 +316,10 @@ a different URL</description>
 
     <highlight language="config">
 # Redirect to a URL on a different host
-Redirect /service http://foo2.example.com/service
+Redirect "/service" "http://foo2.example.com/service"
 
 # Redirect to a URL on the same host
-Redirect /one /two
+Redirect "/one" "/two"
     </highlight>
 
     <p>If the client requests <code>http://example.com/service/foo.txt</code>,
@@ -382,8 +382,8 @@ Redirect /one /two
     <code>send_error_response</code> in http_protocol.c).</p>
 
     <highlight language="config">
-Redirect permanent /one http://example.com/two
-Redirect 303 /three http://example.com/other
+Redirect permanent "/one" "http://example.com/two"
+Redirect 303 "/three" "http://example.com/other"
     </highlight>
 
     <p>If the <directive>Redirect</directive> directive is used within a
@@ -393,14 +393,14 @@ Redirect 303 /three http://example.com/other
     interpreted using <a href="../expr.html">expression syntax</a>.</p>
 
     <highlight language="config">
-&lt;Location /one&gt;
-    Redirect permanent http://example.com/two
+&lt;Location "/one"&gt;
+    Redirect permanent "http://example.com/two"
 &lt;/Location&gt;<br />
-&lt;Location /three&gt;
-    Redirect 303 http://example.com/other
+&lt;Location "/three"&gt;
+    Redirect 303 "http://example.com/other"
 &lt;/Location&gt;<br />
-&lt;LocationMatch /error/(?&lt;NUMBER&gt;[0-9]+)&gt;
-    Redirect permanent http://example.com/errors/%{env:MATCH_NUMBER}.html
+&lt;LocationMatch "/error/(?&lt;NUMBER&gt;[0-9]+)"&gt;
+    Redirect permanent "http://example.com/errors/%{env:MATCH_NUMBER}.html"
 &lt;/LocationMatch&gt;<br />
     </highlight>
 
@@ -429,7 +429,7 @@ of the current URL</description>
     another server, one might use:</p>
 
     <highlight language="config">
-      RedirectMatch (.*)\.gif$ http://other.example.com$1.jpg
+      RedirectMatch "(.*)\.gif$" "http://other.example.com$1.jpg"
     </highlight>
 
     <p>The considerations related to the difference between
@@ -498,15 +498,15 @@ target as a CGI script</description>
     pathname in the local filesystem.</p>
 
     <highlight language="config">
-      ScriptAlias /cgi-bin/ /web/cgi-bin/
+      ScriptAlias "/cgi-bin/" "/web/cgi-bin/"
     </highlight>
 
     <p>A request for <code>http://example.com/cgi-bin/foo</code> would cause the
     server to run the script <code>/web/cgi-bin/foo</code>.  This configuration
     is essentially equivalent to:</p>
     <highlight language="config">
-Alias /cgi-bin/ /web/cgi-bin/
-&lt;Location /cgi-bin &gt;
+Alias "/cgi-bin/" "/web/cgi-bin/"
+&lt;Location "/cgi-bin" &gt;
     SetHandler cgi-script
     Options +ExecCGI
 &lt;/Location&gt;
@@ -516,7 +516,7 @@ Alias /cgi-bin/ /web/cgi-bin/
        a script or handler you have. For example:</p>
 
        <highlight language="config">
-         ScriptAlias /cgi-bin/ /web/cgi-handler.pl
+         ScriptAlias "/cgi-bin/" "/web/cgi-handler.pl"
     </highlight>
 
     <p>In this scenario all files requested in <code>/cgi-bin/</code> will be
@@ -537,7 +537,7 @@ Alias /cgi-bin/ /web/cgi-bin/
     module="core">SetHandler</directive>, and <directive
     module="core">Options</directive> as in:
     <highlight language="config">
-&lt;Directory /usr/local/apache2/htdocs/cgi-bin &gt;
+&lt;Directory "/usr/local/apache2/htdocs/cgi-bin"&gt;
     SetHandler cgi-script
     Options ExecCGI
 &lt;/Directory&gt;
@@ -555,11 +555,11 @@ Alias /cgi-bin/ /web/cgi-bin/
     interpreted using <a href="../expr.html">expression syntax</a>.</p>
 
     <highlight language="config">
-&lt;Location /cgi-bin &gt;
-    ScriptAlias /web/cgi-bin/
+&lt;Location "/cgi-bin"&gt;
+    ScriptAlias "/web/cgi-bin/"
 &lt;/Location&gt;
-&lt;LocationMatch /cgi-bin/errors/(?&lt;NUMBER&gt;[0-9]+)&gt;
-    ScriptAlias /web/cgi-bin/errors/%{env:MATCH_NUMBER}.cgi
+&lt;LocationMatch "/cgi-bin/errors/(?&lt;NUMBER&gt;[0-9]+)"&gt;
+    ScriptAlias "/web/cgi-bin/errors/%{env:MATCH_NUMBER}.cgi"
 &lt;/LocationMatch&gt;<br />
     </highlight>
 
@@ -588,7 +588,7 @@ and designates the target as a CGI script</description>
     might use:</p>
 
     <highlight language="config">
-      ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1
+      ScriptAliasMatch "^/cgi-bin(.*)" "/usr/local/apache/cgi-bin$1"
     </highlight>
 
     <p>As for AliasMatch, the full range of <glossary ref="rexex">regular
@@ -597,7 +597,7 @@ and designates the target as a CGI script</description>
     matching of the URL-path:</p>
 
     <highlight language="config">
-      ScriptAliasMatch (?i)^/cgi-bin(.*) /usr/local/apache/cgi-bin$1
+      ScriptAliasMatch "(?i)^/cgi-bin(.*)" "/usr/local/apache/cgi-bin$1"
     </highlight>
 
     <p>The considerations related to the difference between
@@ -613,4 +613,3 @@ and designates the target as a CGI script</description>
 </directivesynopsis>
 
 </modulesynopsis>
-
index d743b657c3921b1d7a33b6cf10369c5c097fe94b..3fe9a0027625027a793c9ffd16eebdbbeaf166ad 100644 (file)
@@ -43,7 +43,7 @@ in order for it to rebuild correctly.
 used on an server. The most common configuration would be:</p>
 
 <highlight language="config">
-&lt;Location /&gt;
+&lt;Location "/"&gt;
    AllowMethods GET POST OPTIONS
 &lt;/Location&gt;
 </highlight>
@@ -67,7 +67,7 @@ equivalent. The <code>reset</code> keyword can be used
 turn off <module>mod_allowmethods</module> in a deeper nested context:</p>
 
 <highlight language="config">
-&lt;Location /svn&gt;
+&lt;Location "/svn"&gt;
    AllowMethods reset
 &lt;/Location&gt;
 </highlight>
index 145c50477854ebe3da01f0a55e4d98880a1e8c3b..ed64ccd624833b8418cf7c5a3c002b6b2c89a793 100644 (file)
     that the chosen provider module is present in the server.</p>
     <example><title>Example</title>
     <highlight language="config">
-&lt;Location /secure&gt;
+&lt;Location "/secure"&gt;
     AuthType basic
     AuthName "private area"
     AuthBasicProvider  dbm
     AuthDBMType        SDBM
-    AuthDBMUserFile    /www/etc/dbmpasswd
+    AuthDBMUserFile    "/www/etc/dbmpasswd"
     Require            valid-user
 &lt;/Location&gt;
     </highlight>
@@ -137,7 +137,7 @@ username and password</description>
 
     <example><title>Fixed Example</title>
     <highlight language="config">
-&lt;Location /demo&gt;
+&lt;Location "/demo"&gt;
     AuthBasicFake demo demopass
 &lt;/Location&gt;
     </highlight>
@@ -151,8 +151,8 @@ username and password</description>
 
     <example><title>Certificate Example</title>
     <highlight language="config">
-&lt;Location /secure&gt;
-    AuthBasicFake %{SSL_CLIENT_S_DN_Email}
+&lt;Location "/secure"&gt;
+    AuthBasicFake "%{SSL_CLIENT_S_DN_Email}"
 &lt;/Location&gt;
     </highlight>
     </example>
@@ -164,15 +164,15 @@ username and password</description>
 
     <example><title>Password Example</title>
     <highlight language="config">
-&lt;Location /secure&gt;
-    AuthBasicFake %{SSL_CLIENT_S_DN_Email} %{sha1:passphrase-%{SSL_CLIENT_S_DN_Email}}
+&lt;Location "/secure"&gt;
+    AuthBasicFake "%{SSL_CLIENT_S_DN_Email}" "%{sha1:passphrase-%{SSL_CLIENT_S_DN_Email}}"
 &lt;/Location&gt;
     </highlight>
     </example>
 
     <example><title>Exclusion Example</title>
     <highlight language="config">
-&lt;Location /public&gt;
+&lt;Location "/public"&gt;
     AuthBasicFake off
 &lt;/Location&gt;
     </highlight>
index 1d93c39e37461364ad9b1ffd83b600a3cce51453..094750c9205a26886971f8b5805cec90b8a7f48a 100644 (file)
 
     <example><title>Example:</title>
     <highlight language="config">
-&lt;Location /private/&gt;
+&lt;Location "/private/"&gt;
     AuthType Digest
     AuthName "private area"
-    AuthDigestDomain /private/ http://mirror.my.dom/private2/
+    AuthDigestDomain "/private/" "http://mirror.my.dom/private2/"
     
     AuthDigestProvider file
-    AuthUserFile /web/auth/.digest_pw
+    AuthUserFile "/web/auth/.digest_pw"
     Require valid-user
 &lt;/Location&gt;
       </highlight>
index 041c3a732b988b5d9053ce49679b5869f57968bf..8f2dc1fe24f91f1f9eb95b9913fb7e1571c37094 100644 (file)
       <example><title>Basic example</title>
       <highlight language="config">
 AuthFormProvider file
-AuthUserFile conf/passwd
+AuthUserFile "conf/passwd"
 AuthType form
 AuthName realm
-AuthFormLoginRequiredLocation http://example.com/login.html
+AuthFormLoginRequiredLocation "http://example.com/login.html"
 Session On
 SessionCookieName session path=/
 SessionCryptoPassphrase secret
@@ -133,12 +133,12 @@ SessionCryptoPassphrase secret
 
       <example><title>Form login handler example</title>
       <highlight language="config">
-&lt;Location /dologin.html&gt;
+&lt;Location "/dologin.html"&gt;
     SetHandler form-login-handler
-    AuthFormLoginRequiredLocation http://example.com/login.html
-    AuthFormLoginSuccessLocation http://example.com/success.html
+    AuthFormLoginRequiredLocation "http://example.com/login.html"
+    AuthFormLoginSuccessLocation "http://example.com/success.html"
     AuthFormProvider file
-    AuthUserFile conf/passwd
+    AuthUserFile "conf/passwd"
     AuthType form
     AuthName realm
     Session On
@@ -201,11 +201,11 @@ SessionCryptoPassphrase secret
       <example><title>Basic inline example</title>
       <highlight language="config">
 AuthFormProvider file
-ErrorDocument 401 /login.shtml
-AuthUserFile conf/passwd
+ErrorDocument 401 "/login.shtml"
+AuthUserFile "conf/passwd"
 AuthType form
 AuthName realm
-AuthFormLoginRequiredLocation http://example.com/login.html
+AuthFormLoginRequiredLocation "http://example.com/login.html"
 Session On
 SessionCookieName session path=/
 SessionCryptoPassphrase secret
@@ -280,7 +280,7 @@ SessionCryptoPassphrase secret
       <example><title>CGI example</title>
       <highlight language="config">
         AuthFormProvider file
-        ErrorDocument 401 /cgi-bin/login.cgi
+        ErrorDocument 401 "/cgi-bin/login.cgi"
         ...
         </highlight>
       </example>
@@ -304,7 +304,7 @@ SessionCryptoPassphrase secret
       <highlight language="config">
 SetHandler form-logout-handler
 AuthName realm
-AuthFormLogoutLocation http://example.com/loggedout.html
+AuthFormLogoutLocation "http://example.com/loggedout.html"
 Session On
 SessionCookieName session path=/
 SessionCryptoPassphrase secret
@@ -322,7 +322,7 @@ SessionCryptoPassphrase secret
       <example><title>Basic session expiry example</title>
       <highlight language="config">
 SetHandler form-logout-handler
-AuthFormLogoutLocation http://example.com/loggedout.html
+AuthFormLogoutLocation "http://example.com/loggedout.html"
 Session On
 SessionMaxAge 1
 SessionCookieName session path=/
@@ -358,12 +358,12 @@ SessionCryptoPassphrase secret
 
     <example><title>Example</title>
     <highlight language="config">
-&lt;Location /secure&gt;
+&lt;Location "/secure"&gt;
     AuthType form
     AuthName "private area"
     AuthFormProvider  dbm
     AuthDBMType        SDBM
-    AuthDBMUserFile    /www/etc/dbmpasswd
+    AuthDBMUserFile    "/www/etc/dbmpasswd"
     Require            valid-user
     #...
 &lt;/Location&gt;
@@ -634,9 +634,9 @@ parser has been added in 2.4.4.</compatibility>
 
     <example><title>Example</title>
     <highlight language="config">
-&lt;Location /logout&gt;
+&lt;Location "/logout"&gt;
     SetHandler form-logout-handler
-    AuthFormLogoutLocation http://example.com/loggedout.html
+    AuthFormLogoutLocation "http://example.com/loggedout.html"
     Session on
     #...
 &lt;/Location&gt;
index 47abb94dd36568d523988e0c96d4e20486537641..0078c6ee5c9b78321becadbcf3263b06c4e1143b 100644 (file)
 
     <example><title>Example</title>
     <highlight language="config">
-&lt;Directory /var/www/html/private&gt;
+&lt;Directory "/var/www/html/private"&gt;
     AuthName "Use 'anonymous' &amp; Email address for guest entry"
     AuthType Basic
     AuthBasicProvider file anon
-    AuthUserFile /path/to/your/.htpasswd
+    AuthUserFile "/path/to/your/.htpasswd"
     
     Anonymous_NoUserID off
     Anonymous_MustGiveEmail on
index f270ca14deaeb6dfdd76f1740ad103c4272e4621..676e08fcacff374a9d4a5e85c03ddae86330775b 100644 (file)
         <highlight language="config">
 # Check here first
 &lt;AuthnProviderAlias file file1&gt;
-    AuthUserFile /www/conf/passwords1
+    AuthUserFile "/www/conf/passwords1"
 &lt;/AuthnProviderAlias&gt;
 
 # Then check here
 &lt;AuthnProviderAlias file file2&gt;   
-    AuthUserFile /www/conf/passwords2
+    AuthUserFile "/www/conf/passwords2"
 &lt;/AuthnProviderAlias&gt;
 
-&lt;Directory /var/web/pages/secure&gt;
+&lt;Directory "/var/web/pages/secure"&gt;
     AuthBasicProvider file1 file2
     
     AuthType Basic
@@ -93,8 +93,8 @@
     AuthLDAPURL ldap://other.ldap.host/o=dev?cn
 &lt;/AuthnProviderAlias&gt;
 
-Alias /secure /webpages/secure
-&lt;Directory /webpages/secure&gt;
+Alias "/secure" "/webpages/secure"
+&lt;Directory "/webpages/secure"&gt;
     Order deny,allow
     Allow from all
     
@@ -184,15 +184,15 @@ authentication</description>
     <code>/www/docs/public</code> directory without authenticating:</p>
 
     <highlight language="config">
-&lt;Directory /www/docs&gt;
+&lt;Directory "/www/docs"&gt;
     AuthType Basic
     AuthName Documents
     AuthBasicProvider file
-    AuthUserFile /usr/local/apache/passwd/passwords
+    AuthUserFile "/usr/local/apache/passwd/passwords"
     Require valid-user
 &lt;/Directory&gt;
 
-&lt;Directory /www/docs/public&gt;
+&lt;Directory "/www/docs/public"&gt;
     AuthType None
     Require all granted
 &lt;/Directory&gt;
index 69211cbed1e1a80523078bc54d76c3b51f0e7cb2..e82c6dc151e1072e84e85ac21968688f5d97a7e3 100644 (file)
@@ -83,7 +83,7 @@ DBDKeep 8
 DBDMax  20
 DBDExptime 300
 
-&lt;Directory /usr/www/myhost/private&gt;
+&lt;Directory "/usr/www/myhost/private"&gt;
   # mod_authn_core and mod_auth_basic configuration
   # for mod_authn_dbd
   AuthType Basic
index b5d3254f724cc7368c6a5a794709cea864b64c8b..e3718413886bc5f1e220cd302a2ee5caa7abb282 100644 (file)
@@ -72,7 +72,7 @@ the load on backends</description>
     <highlight language="config">
 #AuthnCacheSOCache is optional.  If specified, it is server-wide
 AuthnCacheSOCache dbm
-&lt;Directory /usr/www/myhost/private&gt;
+&lt;Directory "/usr/www/myhost/private"&gt;
     AuthType Basic
     AuthName "Cached Authentication Example"
     AuthBasicProvider socache dbd
index 5cefa686e951afc750c4562045b4458c58b96a52..8430e6feb7186c12492b6957ac5d8dd08566afd3 100644 (file)
@@ -110,7 +110,7 @@ while (FCGI::accept >= 0) {
       Example configuration:
 <highlight language="config">
 AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10102/
-&lt;Location /protected/&gt;
+&lt;Location "/protected/"&gt;
   AuthType Basic
   AuthName "Restricted"
   AuthBasicProvider FooAuthn
@@ -153,7 +153,7 @@ while (FCGI::accept >= 0) {
       Example configuration:
 <highlight language="config">
 AuthnzFcgiDefineProvider authz FooAuthz fcgi://localhost:10103/
-&lt;Location /protected/&gt;
+&lt;Location "/protected/"&gt;
   AuthType ...
   AuthName ...
   AuthBasicProvider ...
@@ -206,7 +206,7 @@ while (FCGI::accept >= 0) {
       Example configuration:
 <highlight language="config">
 AuthnzFcgiDefineProvider authnz FooAuthnz fcgi://localhost:10103/
-&lt;Location /protected/&gt;
+&lt;Location "/protected/"&gt;
   AuthType Basic
   AuthName "Restricted"
   AuthBasicProvider FooAuthnz
@@ -257,7 +257,7 @@ while (FCGI::accept >= 0) {
       Example configuration:
 <highlight language="config">
 AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10103/
-&lt;Location /protected/&gt;
+&lt;Location "/protected/"&gt;
   AuthType ...
   AuthName ...
   AuthnzFcgiCheckAuthnProvider FooAuthn \
index df2bd2d71f8b3158c2abea44607f6da599b3fa29..70695f5181725bf14f28cd58f9bdabf1c858e4b0 100644 (file)
@@ -705,8 +705,8 @@ AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?sub
     that gets created in the web</p>
 <highlight language="config">
 AuthLDAPURL       "the url"
-AuthGroupFile     mygroupfile
-Require group     mygroupfile
+AuthGroupFile     "mygroupfile"
+Require group     "mygroupfile"
 </highlight>
 
 <section id="howitworks"><title>How It Works</title>
index ede7dbad17be7f7a45c0aa4cdc10feb48e3b3cef..1ce4cfcc8207b623983a21b59e43c736f1cd8909 100644 (file)
@@ -71,8 +71,8 @@
     AuthLDAPURL ldap://other.ldap.host/o=dev?cn
 &lt;/AuthzProviderAlias&gt;
 
-Alias /secure /webpages/secure
-&lt;Directory /webpages/secure&gt;
+Alias "/secure" "/webpages/secure"
+&lt;Directory "/webpages/secure"&gt;
     Require all granted
     
     AuthBasicProvider file
@@ -111,7 +111,7 @@ Alias /secure /webpages/secure
     LDAP group <code>Temporary Employees</code>.</p>
 
     <highlight language="config">
-&lt;Directory /www/mydocs&gt;
+&lt;Directory "/www/mydocs"&gt;
     &lt;RequireAll&gt;
         &lt;RequireAny&gt;
             Require user superadmin
@@ -156,7 +156,7 @@ Alias /secure /webpages/secure
 
     <highlight language="config">
 SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in
-&lt;Directory /docroot&gt;
+&lt;Directory "/docroot"&gt;
     Require env let_me_in
 &lt;/Directory&gt;
     </highlight>
@@ -332,8 +332,8 @@ an authorization provider.</description>
 AuthType Basic
 AuthName "Restricted Resource"
 AuthBasicProvider file
-AuthUserFile /web/users
-AuthGroupFile /web/groups
+AuthUserFile "/web/users"
+AuthGroupFile "/web/groups"
 Require group admin
     </highlight>
 
@@ -358,7 +358,7 @@ Require group admin
     are also in the <code>reject</code> group.</p>
 
     <highlight language="config">
-&lt;Directory /www/docs&gt;
+&lt;Directory "/www/docs"&gt;
     &lt;RequireAll&gt;
         Require group alpha beta
         Require not group reject
@@ -556,20 +556,20 @@ sections.</description>
     <code>gamma</code> may access <code>/www/docs/ab/gamma</code>.</note>
 
     <highlight language="config">
-&lt;Directory /www/docs&gt;
+&lt;Directory "/www/docs"&gt;
     AuthType Basic
     AuthName Documents
     AuthBasicProvider file
-    AuthUserFile /usr/local/apache/passwd/passwords
+    AuthUserFile "/usr/local/apache/passwd/passwords"
     Require group alpha
 &lt;/Directory&gt;
 
-&lt;Directory /www/docs/ab&gt;
+&lt;Directory "/www/docs/ab"&gt;
     AuthMerging Or
     Require group beta
 &lt;/Directory&gt;
 
-&lt;Directory /www/docs/ab/gamma&gt;
+&lt;Directory "/www/docs/ab/gamma"&gt;
     Require group gamma
 &lt;/Directory&gt;
     </highlight>
index 982221c55ef16da9493dd88076aa3b149261e7da..84717c396add851cc55ce3c0b8af11450a9ac251 100644 (file)
@@ -140,7 +140,7 @@ DBDKeep 8
 DBDMax  20
 DBDExptime 300
 
-&lt;Directory /usr/www/my.site/team-private/&gt;
+&lt;Directory "/usr/www/my.site/team-private/"&gt;
   # mod_authn_core and mod_auth_basic configuration
   # for mod_authn_dbd
   AuthType Basic
@@ -160,9 +160,9 @@ DBDExptime 300
   # when a user fails to be authenticated or authorized,
   # invite them to login; this page should provide a link
   # to /team-private/login.html
-  ErrorDocument 401 /login-info.html
+  ErrorDocument 401 "/login-info.html"
 
-  &lt;Files login.html&gt;
+  &lt;Files "login.html"&gt;
     # don't require user to already be logged in!
     AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s"
 
@@ -175,7 +175,7 @@ DBDExptime 300
     AuthzDBDLoginToReferer On
   &lt;/Files&gt;
 
-  &lt;Files logout.html&gt;
+  &lt;Files "logout.html"&gt;
     # dbd-logout action executes a statement to log user out
     Require dbd-logout
     AuthzDBDQuery "UPDATE authn SET login = 'false' WHERE user = %s"
index cb727b87999deb4cb27ad4b8b7b2a2ed3d067d9f..c0e1d13d4bff9248656435a945934d8dcd4240db 100644 (file)
 
 <section id="examples">
 <title>Example usage</title>
-<p><em>Note that using mod_authz_dbm requires you to require <code>dbm-group</code> 
+<p><em>Note that using mod_authz_dbm requires you to require <code>dbm-group</code>
 instead of <code>group</code>:</em>
 </p>
 <highlight language="config">
 &lt;Directory "/foo/bar"&gt;
-  AuthType Basic 
+  AuthType Basic
   AuthName "Secure Area"
-  AuthBasicProvider dbm 
-  AuthDBMUserFile site/data/users 
-  AuthDBMGroupFile site/data/users 
-  Require dbm-group admin 
+  AuthBasicProvider dbm
+  AuthDBMUserFile "site/data/users"
+  AuthDBMGroupFile "site/data/users"
+  Require dbm-group admin
 &lt;/Directory&gt;
 </highlight>
 </section>
@@ -127,8 +127,8 @@ of user groups for authorization</description>
     point to the same DBM:</p>
 
     <highlight language="config">
-AuthDBMGroupFile /www/userbase
-AuthDBMUserFile /www/userbase
+AuthDBMGroupFile "/www/userbase"
+AuthDBMUserFile "/www/userbase"
     </highlight>
 
     <p>The key for the single DBM is the username. The value consists
index 475cc7d9f578bc9cccc6b0ba909fb341c0bb4812..0c6190c9e8a794c645eb743e0137cd717de665c5 100644 (file)
       were owned by <code>jones</code> instead of <code>smith</code>.</p>
 
       <highlight language="config">
-&lt;Directory /home/*/public_html/private&gt;
+&lt;Directory "/home/*/public_html/private"&gt;
     AuthType Basic
     AuthName MyPrivateFiles
     AuthBasicProvider dbm
-    AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all
+    AuthDBMUserFile "/usr/local/apache2/etc/.htdbm-all"
     Require file-owner
 &lt;/Directory&gt;
       </highlight>
       each other.</p>
 
       <highlight language="config">
-&lt;Directory /home/*/public_html/project-foo&gt;
+&lt;Directory "/home/*/public_html/project-foo"&gt;
     AuthType Basic
     AuthName "Project Foo Files"
     AuthBasicProvider dbm
     
     # combined user/group database
-    AuthDBMUserFile  /usr/local/apache2/etc/.htdbm-all
-    AuthDBMGroupFile /usr/local/apache2/etc/.htdbm-all
+    AuthDBMUserFile  "/usr/local/apache2/etc/.htdbm-all"
+    AuthDBMGroupFile "/usr/local/apache2/etc/.htdbm-all"
     
     Satisfy All
     Require file-group
index 0f117fccdaeb46805185d502580bbe134dd4c197..732e161b141eabcc62f5dec7bf3a790ad58dee4c 100644 (file)
@@ -563,10 +563,10 @@ a directory</description>
     inherited from other configuration sections. </p>
 
     <highlight language="config">
-&lt;Directory /var/www&gt;
+&lt;Directory "/var/www"&gt;
     IndexIgnore *.bak .??* *~ *# HEADER* README* RCS CVS *,v *,t
 &lt;/Directory&gt;
-&lt;Directory /var/www/backups&gt;
+&lt;Directory "/var/www/backups"&gt;
     IndexIgnoreReset ON
     IndexIgnore .??* *# HEADER* README* RCS CVS *,v *,t
 &lt;/Directory&gt;
@@ -921,7 +921,7 @@ indexing</description>
      single directory are now merged together. The result of:
 
      <highlight language="config">
-&lt;Directory /foo&gt;
+&lt;Directory "/foo"&gt;
     IndexOptions HTMLTable
     IndexOptions SuppressColumnsorting
 &lt;/Directory&gt;
index 8df6864d8d311c1e79faffb0256175a7a4e21792..a5e9080ba28d0fa0ef22f018a241a31ea9c5f946 100644 (file)
@@ -157,14 +157,14 @@ LoadModule cache_module modules/mod_cache.so
 &lt;IfModule mod_cache.c&gt;
     LoadModule cache_disk_module modules/mod_cache_disk.so
     &lt;IfModule mod_cache_disk.c&gt;
-        CacheRoot c:/cacheroot
-        CacheEnable disk  /
+        CacheRoot "c:/cacheroot"
+        CacheEnable disk  "/"
         CacheDirLevels 5
         CacheDirLength 3
     &lt;/IfModule&gt;
 
     # When acting as a proxy, don't cache the list of security updates
-    CacheDisable http://security.update.server/update-list/
+    CacheDisable "http://security.update.server/update-list/"
 &lt;/IfModule&gt;
       </highlight>
     </example>
@@ -226,7 +226,7 @@ LoadModule cache_module modules/mod_cache.so
 #
 &lt;IfModule mod_cache.c&gt;
     CacheLock on
-    CacheLockPath /tmp/mod_cache-lock
+    CacheLockPath "/tmp/mod_cache-lock"
     CacheLockMaxAge 5
 &lt;/IfModule&gt;
       </highlight>
@@ -327,10 +327,10 @@ AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html
   as per the following example:</p>
 
   <highlight language="config">
-CustomLog cached-requests.log common env=cache-hit
-CustomLog uncached-requests.log common env=cache-miss
-CustomLog revalidated-requests.log common env=cache-revalidate
-CustomLog invalidated-requests.log common env=cache-invalidate
+CustomLog "cached-requests.log" common env=cache-hit
+CustomLog "uncached-requests.log" common env=cache-miss
+CustomLog "revalidated-requests.log" common env=cache-revalidate
+CustomLog "invalidated-requests.log" common env=cache-invalidate
   </highlight>
 
   <p>For module authors, a hook called <var>cache_status</var> is available,
@@ -380,13 +380,13 @@ manager</description>
     <highlight language="config">
 # Cache content (normal handler only)
 CacheQuickHandler off
-&lt;Location /foo&gt;
+&lt;Location "/foo"&gt;
     CacheEnable disk
 &lt;/Location&gt;
 
 # Cache regex (normal handler only)
 CacheQuickHandler off
-&lt;LocationMatch foo$&gt;
+&lt;LocationMatch "foo$"&gt;
     CacheEnable disk
 &lt;/LocationMatch&gt;
 
@@ -406,9 +406,9 @@ CacheEnable  disk  http://www.example.org/
 
     <highlight language="config">
 # Match www.example.org, and fooexample.org
-CacheEnable  disk  http://*example.org/
+CacheEnable  disk  "http://*example.org/"
 # Match www.example.org, but not fooexample.org
-CacheEnable  disk  http://.example.org/
+CacheEnable  disk  "http://.example.org/"
     </highlight>
 
     <p> The <code>no-cache</code> environment variable can be set to
@@ -434,7 +434,7 @@ CacheEnable  disk  http://.example.org/
 
     <example><title>Example</title>
     <highlight language="config">
-      CacheDisable /local_files
+      CacheDisable "/local_files"
       </highlight>
     </example>
 
@@ -444,7 +444,7 @@ CacheEnable  disk  http://.example.org/
 
     <example><title>Example</title>
     <highlight language="config">
-&lt;Location /foo&gt;
+&lt;Location "/foo"&gt;
     CacheDisable on
 &lt;/Location&gt;
       </highlight>
@@ -1055,7 +1055,7 @@ CacheDetailHeader on
 
   <highlight language="config">
 # Override the base URL of the cache key.
-CacheKeyBaseURL http://www.example.com/
+CacheKeyBaseURL "http://www.example.com/"
   </highlight>
 
   <note type="warning">Take care when setting this directive. If two separate virtual
index 31516532e2de2fe12ce6fb5953ea62410f3d274d..bcecf75e0f344086529cd688b475c36ee1b64222 100644 (file)
 
     <example><title>Example</title>
     <highlight language="config">
-&lt;Directory /export/home/trawick/apacheinst/htdocs/convert&gt;
+&lt;Directory "/export/home/trawick/apacheinst/htdocs/convert"&gt;
     CharsetSourceEnc  UTF-16BE
     CharsetDefault    ISO-8859-1
 &lt;/Directory&gt;
 
     <example><title>Example</title>
     <highlight language="config">
-&lt;Directory /export/home/trawick/apacheinst/htdocs/convert&gt;
+&lt;Directory "/export/home/trawick/apacheinst/htdocs/convert"&gt;
     CharsetSourceEnc  UTF-16BE
     CharsetDefault    ISO-8859-1
 &lt;/Directory&gt;
index 51b9b58e7f6c843c7a44b376b1efad77f2115ff4..b4852fba15735f82b8588397d96f67328d15e812 100644 (file)
@@ -57,7 +57,7 @@
 
     <example><title>Configuring the filter</title>
     <highlight language="config">
-&lt;Location /data/images&gt;
+&lt;Location "/data/images"&gt;
     SetOutputFilter DATA
 &lt;/Location&gt;
         </highlight>
index 2d202c0eb3e534ea18152bc4bd5d46e36df44c56..c4eb0bb4dae246cde1c101ec896a16563bedd544 100644 (file)
 
     <example><title>Full Example</title>
     <highlight language="config">
-DavLockDB /usr/local/apache2/var/DavLock
+DavLockDB "/usr/local/apache2/var/DavLock"
 
-&lt;Directory /usr/local/apache2/htdocs/foo&gt;
+&lt;Directory "/usr/local/apache2/htdocs/foo"&gt;
     Require all granted
     Dav On
 
     AuthType Basic
     AuthName DAV
-    AuthUserFile user.passwd
+    AuthUserFile "user.passwd"
 
     &lt;LimitExcept GET POST OPTIONS&gt;
         Require user admin
@@ -149,9 +149,9 @@ DavLockDB /usr/local/apache2/var/DavLock
     downloaded and manipulated with DAV.</p>
 
 <highlight language="config">
-Alias /phparea /home/gstein/php_files
-Alias /php-source /home/gstein/php_files
-&lt;Location /php-source&gt;
+Alias "/phparea" "/home/gstein/php_files"
+Alias "/php-source" "/home/gstein/php_files"
+&lt;Location "/php-source"&gt;
     Dav On
     ForceType text/plain
 &lt;/Location&gt;
@@ -175,7 +175,7 @@ Alias /php-source /home/gstein/php_files
     WebDAV HTTP methods for the given container:</p>
 
     <highlight language="config">
-&lt;Location /foo&gt;
+&lt;Location "/foo"&gt;
     Dav On
 &lt;/Location&gt;
     </highlight>
@@ -218,7 +218,7 @@ a DAV resource</description>
 
     <example><title>Example</title>
     <highlight language="config">
-&lt;Location /MSWord&gt;
+&lt;Location "/MSWord"&gt;
     DavMinTimeout 600
 &lt;/Location&gt;
     </highlight>
index 5fbf72158c5d601752cba8376d7b4e659c969c63..224bdd05c5311436be249992afddc1561ca4e0ea 100644 (file)
@@ -70,8 +70,8 @@
 
     <example><title>Example</title>
     <highlight language="config">
-      DavLockDB var/DavLock
-      </highlight>
+      DavLockDB "var/DavLock"
+    </highlight>
     </example>
 
     <p>The directory containing the lock database file must be
index 083ed62e08cbc7171d19f6e21d74d9f36c590d53..e6db1f1717c729339269ccb06afbe43e95075332 100644 (file)
@@ -68,7 +68,7 @@ client</description>
 
       <highlight language="config">
 SetOutputFilter DEFLATE
-SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip 
+SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip 
       </highlight>
 
       <p>If you want to restrict the compression to particular MIME types
@@ -104,8 +104,8 @@ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
       >AddOutputFilter</directive>, for example:</p>
 
       <highlight language="config">
-&lt;Location /dav-area&gt;
-    ProxyPass http://example.com/
+&lt;Location "/dav-area"&gt;
+    ProxyPass "http://example.com/"
     SetOutputFilter INFLATE
 &lt;/Location&gt;
       </highlight>
@@ -124,7 +124,7 @@ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
       >AddInputFilter</directive>, for example:</p>
 
       <highlight language="config">
-&lt;Location /dav-area&gt;
+&lt;Location "/dav-area"&gt;
     SetInputFilter DEFLATE
 &lt;/Location&gt;
       </highlight>
@@ -191,20 +191,20 @@ content</title>
 &lt;IfModule mod_headers.c&gt;
     # Serve gzip compressed CSS files if they exist 
     # and the client accepts gzip.
-    RewriteCond %{HTTP:Accept-encoding} gzip
-    RewriteCond %{REQUEST_FILENAME}\.gz -s
-    RewriteRule ^(.*)\.css $1\.css\.gz [QSA]
+    RewriteCond "%{HTTP:Accept-encoding}" "gzip"
+    RewriteCond "%{REQUEST_FILENAME}\.gz" -s
+    RewriteRule "^(.*)\.css" "$1\.css\.gz" [QSA]
 
     # Serve gzip compressed JS files if they exist 
     # and the client accepts gzip.
-    RewriteCond %{HTTP:Accept-encoding} gzip
-    RewriteCond %{REQUEST_FILENAME}\.gz -s
-    RewriteRule ^(.*)\.js $1\.js\.gz [QSA]
+    RewriteCond "%{HTTP:Accept-encoding}" "gzip"
+    RewriteCond "%{REQUEST_FILENAME}\.gz" -s
+    RewriteRule "^(.*)\.js" "$1\.js\.gz" [QSA]
 
 
     # Serve correct content types, and prevent mod_deflate double gzip.
-    RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
-    RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1]
+    RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1]
+    RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1]
 
 
     &lt;FilesMatch "(\.js\.gz|\.css\.gz)$"&gt;
@@ -240,7 +240,7 @@ content</title>
       DeflateFilterNote ratio
     
       LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate
-      CustomLog logs/deflate_log deflate
+      CustomLog "logs/deflate_log" deflate
       </highlight>
     </example>
 
@@ -270,7 +270,7 @@ DeflateFilterNote Output outstream
 DeflateFilterNote Ratio ratio
 
 LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
-CustomLog logs/deflate_log deflate
+CustomLog "logs/deflate_log" deflate
 </highlight>
     </example>
 </usage>
index c8fdf53808e2257aaa65bc228addd6146c58344f..4b1ee4250f9e3b5573bf1c33c0c0ea9ceafc763d 100644 (file)
@@ -37,8 +37,8 @@ by the various old modem standards. So, you can browse your site with a 56k
 V.92 modem, by adding something like this:</p>
 
 <highlight language="config">
-&lt;Location /mysite&gt;
-    ModemStandard V.92
+&lt;Location "/mysite"&gt;
+    ModemStandard "V.92"
 &lt;/Location&gt;
 </highlight>
 
@@ -59,8 +59,8 @@ once the timer hits.  From there the handler can continue to send data to the cl
 <p>Specify what modem standard you wish to simulate.</p>
 
 <highlight language="config">
-&lt;Location /mysite&gt;
-    ModemStandard V.26bis
+&lt;Location "/mysite"&gt;
+    ModemStandard "V.26bis"
 &lt;/Location&gt;
 </highlight>
 
index 24f295587541c430129967bc3cfa856664a126c1..065b1881dcca860e8d4d160510e4a52bc0700d27 100644 (file)
@@ -148,19 +148,19 @@ a directory</td></tr>
     to the list of resources to look for rather than replace:
     </p>
     <pre class="prettyprint lang-config"># Example A: Set index.html as an index page, then add index.php to that list as well.
-&lt;Directory /foo&gt;
+&lt;Directory "/foo"&gt;
     DirectoryIndex index.html
     DirectoryIndex index.php
 &lt;/Directory&gt;
 
 # Example B: This is identical to example A, except it's done with a single directive.
-&lt;Directory /foo&gt;
+&lt;Directory "/foo"&gt;
     DirectoryIndex index.html index.php
 &lt;/Directory&gt;
 
 # Example C: To replace the list, you must explicitly reset it first:
 # In this example, only index.php will remain as an index resource.
-&lt;Directory /foo&gt;
+&lt;Directory "/foo"&gt;
     DirectoryIndex index.html
     DirectoryIndex disabled
     DirectoryIndex index.php
@@ -298,10 +298,10 @@ later</td></tr>
     if inheritance from a parent directory is not desired.</p>
     <p>In a sub-URI, such as <em>http://example.com/blog/</em> this
     <em>sub-URI</em> has to be supplied as <var>local-url</var>:</p>
-    <pre class="prettyprint lang-config">&lt;Directory /web/example.com/htdocs/blog&gt;
+    <pre class="prettyprint lang-config">&lt;Directory "/web/example.com/htdocs/blog"&gt;
     FallbackResource /blog/index.php
 &lt;/Directory&gt;
-&lt;Directory /web/example.com/htdocs/blog/images&gt;
+&lt;Directory "/web/example.com/htdocs/blog/images"&gt;
     FallbackResource disabled
 &lt;/Directory&gt;</pre>
 
index 58119a66edc1c8e8752510e021a3d5bd9e6be667..bd34de70873ff40c99322bf51de5b6c17f2d6a77 100644 (file)
@@ -108,19 +108,19 @@ a directory</description>
     </p>
     <highlight language="config">
 # Example A: Set index.html as an index page, then add index.php to that list as well.
-&lt;Directory /foo&gt;
+&lt;Directory "/foo"&gt;
     DirectoryIndex index.html
     DirectoryIndex index.php
 &lt;/Directory&gt;
 
 # Example B: This is identical to example A, except it's done with a single directive.
-&lt;Directory /foo&gt;
+&lt;Directory "/foo"&gt;
     DirectoryIndex index.html index.php
 &lt;/Directory&gt;
 
 # Example C: To replace the list, you must explicitly reset it first:
 # In this example, only index.php will remain as an index resource.
-&lt;Directory /foo&gt;
+&lt;Directory "/foo"&gt;
     DirectoryIndex index.html
     DirectoryIndex disabled
     DirectoryIndex index.php
@@ -209,7 +209,7 @@ a directory</description>
 
     <highlight language="config">
 # see security warning below!
-&lt;Location /some/path&gt;
+&lt;Location "/some/path"&gt;
     DirectorySlash Off
     SetHandler some-handler
 &lt;/Location&gt;
@@ -267,10 +267,10 @@ later</compatibility>
     <p>In a sub-URI, such as <em>http://example.com/blog/</em> this
     <em>sub-URI</em> has to be supplied as <var>local-url</var>:</p>
     <highlight language="config">
-&lt;Directory /web/example.com/htdocs/blog&gt;
+&lt;Directory "/web/example.com/htdocs/blog"&gt;
     FallbackResource /blog/index.php
 &lt;/Directory&gt;
-&lt;Directory /web/example.com/htdocs/blog/images&gt;
+&lt;Directory "/web/example.com/htdocs/blog/images"&gt;
     FallbackResource disabled
 &lt;/Directory&gt;
     </highlight>
index dfb9655b8dc16ba8612138a403500a8d159d5ab2..941ca2011cd4158290c4564de70e4ff649a4b3ba 100644 (file)
     <p>To activate the example_hooks module, include a block similar to
     the following in your <code>httpd.conf</code> file:</p>
 <highlight language="config">
-&lt;Location /example-hooks-info&gt;
+&lt;Location "/example-hooks-info"&gt;
    SetHandler example-hooks-handler
 &lt;/Location&gt;
 </highlight>
     href="core.html#accessfilename"><code>.htaccess</code></a> file
     and then request the file "test.example" from that location:</p>
 <highlight language="config">
-   AddHandler example-hooks-handler .example
+   AddHandler example-hooks-handler ".example"
 </highlight>
 
     <p>After reloading/restarting your server, you should be able
index 75f375897dff2d93e29dd73aa57e14a6d2d804f2..325caf1b540ff95c1d6039fffb2337bfc433ac50 100644 (file)
@@ -90,7 +90,7 @@ ExtFilterDefine c-to-html mode=output \
 # mod_ext_filter directive to define the external filter
 ExtFilterDefine gzip mode=output cmd=/bin/gzip
 
-&lt;Location /gzipped&gt;
+&lt;Location "/gzipped"&gt;
     
     # core directive to cause the gzip filter to be
     # run on output
@@ -112,7 +112,7 @@ ExtFilterDefine gzip mode=output cmd=/bin/gzip
 ExtFilterDefine slowdown mode=output cmd=/bin/cat \
     preservescontentlength
 
-&lt;Location /&gt;
+&lt;Location "/"&gt;
     # core directive to cause the slowdown filter to
     # be run several times on output
     #
@@ -129,7 +129,7 @@ ExtFilterDefine slowdown mode=output cmd=/bin/cat \
 ExtFilterDefine fixtext mode=output intype=text/html \
     cmd="/bin/sed s/verdana/arial/g"
 
-&lt;Location /&gt;
+&lt;Location "/"&gt;
     # core directive to cause the fixtext filter to
     # be run on output
     SetOutputFilter fixtext
@@ -163,7 +163,7 @@ ExtFilterDefine traceafter \
     cmd="/bin/tracefilter.pl /tmp/traceafter" \
     EnableEnv=trace_this_client ftype=21
 
-&lt;Directory /usr/local/docs&gt;
+&lt;Directory "/usr/local/docs"&gt;
     SetEnvIf Remote_Addr 192.168.1.31 trace_this_client
     SetOutputFilter tracebefore;deflate;traceafter
 &lt;/Directory&gt;
index 54e9c01bfebfe25c67d7658df6148e4af2f47cda..4da8b72c28ece5cbc2acff7fdaa915e1905336d6 100644 (file)
@@ -194,7 +194,7 @@ FilterProtocol downsample "change=yes"
 FilterProvider repack jpeg_pack "%{CONTENT_TYPE} = 'image/jpeg'"
 FilterProvider repack gif_pack "%{CONTENT_TYPE} = 'image/gif'"
 FilterProvider repack png_pack "%{CONTENT_TYPE} = 'image/png'"
-&lt;Location /image-filter&gt;
+&lt;Location "/image-filter"&gt;
     FilterChain unpack downsample repack
 &lt;/Location&gt;
     </highlight>
@@ -282,7 +282,7 @@ being moved to <module>mod_filter</module> in version 2.3.7</compatibility>
     filter.</p>
 
     <highlight language="config">
-&lt;Location /cgi-bin/&gt;
+&lt;Location "/cgi-bin/"&gt;
     Options Includes
     AddOutputFilterByType INCLUDES;DEFLATE text/html
 &lt;/Location&gt;
index 8a1aa5b279a72d9ca8edfe8dab331bb34f58abe8..9aa56013f0b2c1c7d5ae1ae26feac07f59f17458 100644 (file)
@@ -34,7 +34,7 @@ configuration</description>
     <code>httpd.conf</code> file.</p>
 
     <highlight language="config">
-&lt;Location /server-info&gt;
+&lt;Location "/server-info"&gt;
     SetHandler server-info
 &lt;/Location&gt;
     </highlight>
@@ -45,7 +45,7 @@ configuration</description>
     information:</p>
 
     <highlight language="config">
-&lt;Location /server-info&gt;
+&lt;Location "/server-info"&gt;
     SetHandler server-info
     Require host example.com
 &lt;/Location&gt;
@@ -73,7 +73,7 @@ configuration</description>
 
     <example><title>Access control</title>
     <highlight language="config">
-&lt;Location /server-info&gt;
+&lt;Location "/server-info"&gt;
     SetHandler server-info
     Order allow,deny
     # Allow access from server itself
index ba17358bc197fae3fc9da75b918bf16c6cefa128..db993d56168b28beb03c68e9e6d8b2379b4105b8 100644 (file)
@@ -70,7 +70,7 @@ LDAPCacheTTL 600
 LDAPOpCacheEntries 1024
 LDAPOpCacheTTL 600
 
-&lt;Location /ldap-status&gt;
+&lt;Location "/ldap-status"&gt;
     SetHandler ldap-status
 
     Require host yourdomain.example.com
@@ -79,7 +79,7 @@ LDAPOpCacheTTL 600
     AuthType Basic
     AuthName "LDAP Protected"
     AuthBasicProvider ldap
-    AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one
+    AuthLDAPURL "ldap://127.0.0.1/dc=example,dc=com?uid?one"
     Require valid-user
 &lt;/Location&gt;
     </highlight>
@@ -179,7 +179,7 @@ LDAPOpCacheTTL 600
       <module>mod_ldap</module> cache information:</p>
 
       <highlight language="config">
-&lt;Location /server/cache-info&gt;
+&lt;Location "/server/cache-info"&gt;
     SetHandler ldap-status
 &lt;/Location&gt;
       </highlight>
@@ -210,9 +210,9 @@ LDAPOpCacheTTL 600
 # mod_ldap and mod_authnz_ldap be loaded. Change the
 # "yourdomain.example.com" to match your domain.
 
-LDAPTrustedGlobalCert CA_DER /certs/certfile.der
+LDAPTrustedGlobalCert CA_DER "/certs/certfile.der"
 
-&lt;Location /ldap-status&gt;
+&lt;Location "/ldap-status"&gt;
     SetHandler ldap-status
 
     Require host yourdomain.example.com
@@ -221,7 +221,7 @@ LDAPTrustedGlobalCert CA_DER /certs/certfile.der
     AuthType Basic
     AuthName "LDAP Protected"
     AuthBasicProvider ldap
-    AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
+    AuthLDAPURL "ldaps://127.0.0.1/dc=example,dc=com?uid?one"
     Require valid-user
 &lt;/Location&gt;
     </highlight>
@@ -231,9 +231,9 @@ LDAPTrustedGlobalCert CA_DER /certs/certfile.der
 # mod_ldap and mod_authnz_ldap be loaded. Change the
 # "yourdomain.example.com" to match your domain.
 
-LDAPTrustedGlobalCert CA_DER /certs/certfile.der
+LDAPTrustedGlobalCert CA_DER "/certs/certfile.der:
 
-&lt;Location /ldap-status&gt;
+&lt;Location "/ldap-status"&gt;
     SetHandler ldap-status
 
     Require host yourdomain.example.com
@@ -242,7 +242,7 @@ LDAPTrustedGlobalCert CA_DER /certs/certfile.der
     AuthType Basic
     AuthName "LDAP Protected"
     AuthBasicProvider ldap
-    AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one TLS
+    AuthLDAPURL "ldap://127.0.0.1/dc=example,dc=com?uid?one" TLS
     Require valid-user
 &lt;/Location&gt;
     </highlight>
@@ -280,12 +280,12 @@ LDAPTrustedGlobalCert CA_DER /certs/certfile.der
 
         <highlight language="config">
 # Specify a Netscape CA certificate file
-LDAPTrustedGlobalCert CA_CERT7_DB /certs/cert7.db
+LDAPTrustedGlobalCert CA_CERT7_DB "/certs/cert7.db"
 # Specify an optional key3.db file for client certificate support
-LDAPTrustedGlobalCert CERT_KEY3_DB /certs/key3.db
+LDAPTrustedGlobalCert CERT_KEY3_DB "/certs/key3.db"
 # Specify the secmod file if required
-LDAPTrustedGlobalCert CA_SECMOD /certs/secmod
-&lt;Location /ldap-status&gt;
+LDAPTrustedGlobalCert CA_SECMOD "/certs/secmod"
+&lt;Location "/ldap-status"&gt;
     SetHandler ldap-status
 
     Require host yourdomain.example.com
@@ -295,7 +295,7 @@ LDAPTrustedGlobalCert CA_SECMOD /certs/secmod
     AuthName "LDAP Protected"
     AuthBasicProvider ldap
     LDAPTrustedClientCert CERT_NICKNAME &lt;nickname&gt; [password]
-    AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
+    AuthLDAPURL "ldaps://127.0.0.1/dc=example,dc=com?uid?one"
     Require valid-user
 &lt;/Location&gt;
         </highlight>
@@ -320,13 +320,13 @@ LDAPTrustedGlobalCert CA_SECMOD /certs/secmod
 
         <highlight language="config">
 # Specify two CA certificate files
-LDAPTrustedGlobalCert CA_DER /certs/cacert1.der
-LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem
+LDAPTrustedGlobalCert CA_DER "/certs/cacert1.der"
+LDAPTrustedGlobalCert CA_BASE64 "/certs/cacert2.pem"
 # Specify a client certificate file and key
-LDAPTrustedGlobalCert CERT_BASE64 /certs/cert1.pem
-LDAPTrustedGlobalCert KEY_BASE64 /certs/key1.pem [password]
+LDAPTrustedGlobalCert CERT_BASE64 "/certs/cert1.pem"
+LDAPTrustedGlobalCert KEY_BASE64 "/certs/key1.pem" [password]
 # Do not use this directive, as it will throw an error
-#LDAPTrustedClientCert CERT_BASE64 /certs/cert1.pem
+#LDAPTrustedClientCert CERT_BASE64 "/certs/cert1.pem"
         </highlight>
 
     </section>
@@ -352,23 +352,23 @@ LDAPTrustedGlobalCert KEY_BASE64 /certs/key1.pem [password]
 
         <highlight language="config">
 # Specify two CA certificate files
-LDAPTrustedGlobalCert CA_DER /certs/cacert1.der
-LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem
-&lt;Location /ldap-status&gt;
+LDAPTrustedGlobalCert CA_DER "/certs/cacert1.der"
+LDAPTrustedGlobalCert CA_BASE64 "/certs/cacert2.pem"
+&lt;Location "/ldap-status"&gt;
     SetHandler ldap-status
 
     Require host yourdomain.example.com
 
-    LDAPTrustedClientCert CERT_BASE64 /certs/cert1.pem
-    LDAPTrustedClientCert KEY_BASE64 /certs/key1.pem
+    LDAPTrustedClientCert CERT_BASE64 "/certs/cert1.pem"
+    LDAPTrustedClientCert KEY_BASE64 "/certs/key1.pem"
     # CA certs respecified due to per-directory client certs
-    LDAPTrustedClientCert CA_DER /certs/cacert1.der
-    LDAPTrustedClientCert CA_BASE64 /certs/cacert2.pem
+    LDAPTrustedClientCert CA_DER "/certs/cacert1.der"
+    LDAPTrustedClientCert CA_BASE64 "/certs/cacert2.pem"
     Satisfy any
     AuthType Basic
     AuthName "LDAP Protected"
     AuthBasicProvider ldap
-    AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
+    AuthLDAPURL "ldaps://127.0.0.1/dc=example,dc=com?uid?one"
     Require valid-user
 &lt;/Location&gt;
         </highlight>
index df07a75b1e3b6c2ce7d3e2e74cf3d86bac9938b6..5863d6bd0afa5e967642d0a574a724efb6f6388a 100644 (file)
@@ -462,10 +462,10 @@ expr=<var>expression</var>]</syntax>
     <highlight language="config">
 # CustomLog with format nickname
 LogFormat "%h %l %u %t \"%r\" %&gt;s %b" common
-CustomLog logs/access_log common
+CustomLog "logs/access_log" common
 
 # CustomLog with explicit format string
-CustomLog logs/access_log "%h %l %u %t \"%r\" %&gt;s %b"
+CustomLog "logs/access_log" "%h %l %u %t \"%r\" %&gt;s %b"
     </highlight>
 
     <p>The third argument is optional and controls whether or
@@ -487,8 +487,8 @@ CustomLog logs/access_log "%h %l %u %t \"%r\" %&gt;s %b"
 
     <highlight language="config">
 SetEnvIf Request_URI \.gif$ gif-image
-CustomLog gif-requests.log common env=gif-image
-CustomLog nongif-requests.log common env=!gif-image
+CustomLog "gif-requests.log" common env=gif-image
+CustomLog "nongif-requests.log" common env=!gif-image
     </highlight>
 
     <p>Or, to reproduce the behavior of the old RefererIgnore
@@ -496,7 +496,7 @@ CustomLog nongif-requests.log common env=!gif-image
 
     <highlight language="config">
 SetEnvIf Referer example\.com localreferer
-CustomLog referer.log referer env=!localreferer
+CustomLog "referer.log" referer env=!localreferer
     </highlight>
 </usage>
 </directivesynopsis>
index ca31d2eac47f8c25bf64b6473c6d731c21f3b50c..d32a0a1089ee883423602af5b8bdb8d16d382c82 100644 (file)
@@ -36,7 +36,7 @@
         Log message after request to /foo/* is processed:
 
         <highlight language="config">
-&lt;Location /foo/&gt;
+&lt;Location "/foo/"&gt;
 &nbsp;&nbsp;LogMessage "/foo/ has been requested"
 &lt;/Location&gt;
         </highlight>
@@ -45,7 +45,7 @@
       <li>
         Log message if request to /foo/* is processed in a sub-request:
         <highlight language="config">
-&lt;Location /foo/&gt;
+&lt;Location "/foo/"&gt;
 &nbsp;&nbsp;LogMessage "subrequest to /foo/" hook=type_checker expr=%{IS_SUBREQ}
 &lt;/Location&gt;
         </highlight>
@@ -67,7 +67,7 @@
         Log the value of the "X-Foo" request environment variable in each
         stage of the request:
         <highlight language="config">
-&lt;Location /&gt;
+&lt;Location "/"&gt;
 &nbsp;&nbsp;LogMessage "%{reqenv:X-Foo}" hook=all
 &lt;/Location&gt;
         </highlight>
index 0673e047289df7d586ba332dee4bd4c61c3b28a3..95f7a1ef2403f30eebd88f157fedd095616b1996 100644 (file)
@@ -71,7 +71,7 @@ module="core">SetHandler</directive> or
 <directive module="mod_mime">AddHandler</directive> directive:</p>
 
 <highlight language="config">
-&lt;Files *.lua&gt;
+&lt;Files "*.lua"&gt;
     SetHandler lua-script
 &lt;/Files&gt;
 </highlight>
@@ -194,7 +194,7 @@ end
 <code>foo</code> and configures it for URL <code>/</code>:</p>
 <highlight language="config">
 LuaAuthzProvider foo authz_provider.lua authz_check_foo
-&lt;Location /&gt;
+&lt;Location "/"&gt;
   Require foo 10.1.2.3 john_doe
 &lt;/Location&gt;
 </highlight>
@@ -1356,7 +1356,7 @@ collectgarbage() -- close the handle via GC
     issues.</p>
    <example><title>Examples:</title>
    <highlight language="config">
-    LuaMapHandler /(\w+)/(\w+) /scripts/$1.lua handle_$2
+    LuaMapHandler "/(\w+)/(\w+)" "/scripts/$1.lua" "handle_$2"
     </highlight>
    </example>
         <p>This would match uri's such as /photos/show?id=9
@@ -1365,7 +1365,7 @@ collectgarbage() -- close the handle via GC
         loading that file.</p>
 
 <highlight language="config">
-    LuaMapHandler /bingo /scripts/wombat.lua
+    LuaMapHandler "/bingo" "/scripts/wombat.lua"
 </highlight>
         <p>This would invoke the "handle" function, which
         is the default if no specific function name is
@@ -1387,8 +1387,8 @@ collectgarbage() -- close the handle via GC
 
     <example><title>Examples:</title>
     <highlight language="config">
-LuaPackagePath /scripts/lib/?.lua
-LuaPackagePath /scripts/lib/?/init.lua
+LuaPackagePath "/scripts/lib/?.lua"
+LuaPackagePath "/scripts/lib/?/init.lua"
     </highlight>
     </example>
 </usage>
@@ -1472,7 +1472,7 @@ LuaCodeCache never
 
 <highlight language="config">
 # httpd.conf
-LuaHookTranslateName /scripts/conf/hooks.lua silly_mapper
+LuaHookTranslateName "/scripts/conf/hooks.lua" silly_mapper
 </highlight>
 
 <highlight language="lua">
@@ -1535,7 +1535,7 @@ processing</description>
 </p>
 <p>Example:</p>
 <highlight language="config">
-LuaHookLog /path/to/script.lua logger
+LuaHookLog "/path/to/script.lua" logger
 </highlight>
 <highlight language="lua">
 -- /path/to/script.lua --
@@ -1577,7 +1577,7 @@ end
     map-to-storage phase of a request. Modules like mod_cache run at this phase,
     which makes for an interesting example on what to do here:</p>
     <highlight language="config">
-    LuaHookMapToStorage /path/to/lua/script.lua check_cache
+    LuaHookMapToStorage "/path/to/lua/script.lua" check_cache
     </highlight>
     <highlight language="lua">
 require"apache2"
@@ -1643,7 +1643,7 @@ end
     be used to modify the type and handler based on input:
     </p>
     <highlight language="config">
-    LuaHookTypeChecker /path/to/lua/script.lua type_checker
+    LuaHookTypeChecker "/path/to/lua/script.lua" type_checker
     </highlight>
     <highlight language="lua">
     function type_checker(r)
@@ -1796,9 +1796,9 @@ hook function usually returns OK, DECLINED, or HTTP_FORBIDDEN.</p>
 with the <directive module="mod_authz_core">Require</directive> directive:</p>
 
 <highlight language="config">
-LuaRoot /usr/local/apache2/lua
+LuaRoot "/usr/local/apache2/lua"
 LuaAuthzProvider foo authz.lua authz_check_foo
-&lt;Location /&gt;
+&lt;Location "/"&gt;
   Require foo johndoe
 &lt;/Location&gt;
 </highlight>
@@ -1833,8 +1833,8 @@ onto the Lua script:
 </p>
 
 <highlight language="config">
-LuaInputFilter myInputFilter /www/filter.lua input_filter
-&lt;Files *.lua&gt;
+LuaInputFilter myInputFilter "/www/filter.lua" input_filter
+&lt;Files "*.lua"&gt;
   SetInputFilter myInputFilter
 &lt;/Files&gt;
 </highlight>
@@ -1890,8 +1890,8 @@ onto the Lua script:
 </p>
 
 <highlight language="config">
-LuaOutputFilter myOutputFilter /www/filter.lua output_filter
-&lt;Files *.lua&gt;
+LuaOutputFilter myOutputFilter "/www/filter.lua" output_filter
+&lt;Files "*.lua"&gt;
   SetOutputFilter myOutputFilter
 &lt;/Files&gt;
 </highlight>
index c938293cbc661d13a17190759ec2d809510e0882..d192db3777a9e51ed78cc90f8eb15380dcdd0a7a 100644 (file)
@@ -55,9 +55,9 @@ multiple similar virtual hosts:</p>
     ServerName $domain
     ServerAlias www.$domain
 
-    DocumentRoot /var/www/vhosts/$name
-    ErrorLog /var/log/httpd/$name.error_log
-    CustomLog /var/log/httpd/$name.access_log combined
+    DocumentRoot "/var/www/vhosts/$name"
+    ErrorLog "/var/log/httpd/$name.error_log"
+    CustomLog "/var/log/httpd/$name.access_log" combined
 &lt;/VirtualHost&gt;
 &lt;/Macro&gt;
 </highlight>
@@ -114,7 +114,7 @@ surround the parameter in braces, to avoid confusion:</p>
 
 <highlight language="config">
 &lt;Macro DocRoot ${docroot}&gt;
-    DocumentRoot /var/www/${docroot}/htdocs
+    DocumentRoot "/var/www/${docroot}/htdocs"
 &lt;/Macro&gt;
 </highlight>
 
@@ -137,15 +137,15 @@ dynamically-generated virtual hosts.</p>
   &lt;VirtualHost *:$port&gt;
 
     ServerName $host
-    DocumentRoot $dir
+    DocumentRoot "$dir"
 
     # Public document root
-    &lt;Directory $dir&gt;
+    &lt;Directory "$dir"&gt;
         Require all granted
     &lt;/Directory&gt;
 
     # limit access to intranet subdir.
-    &lt;Directory $dir/intranet&gt;
+    &lt;Directory "$dir/intranet"&gt;
       Require ip 10.0.0.0/8
     &lt;/Directory&gt;
   &lt;/VirtualHost&gt;
@@ -168,7 +168,7 @@ conflicts in variable names.</p>
 
 <highlight language="config">
 &lt;Macro DirGroup $dir $group&gt;
-  &lt;Directory $dir&gt;
+  &lt;Directory "$dir"&gt;
     Require group $group
   &lt;/Directory&gt;
 &lt;/Macro&gt;
index 95236b1e3b5002a0fd2d1b77ff0a3396f5dff570..e6c913e0ec07f1aba214295a5086bb9900d0ce17 100644 (file)
@@ -144,7 +144,7 @@ module="mod_mime_magic">MimeMagicFile</directive></seealso>
 
     <example><title>Configure handler based on final extension only</title>
     <highlight language="config">
-&lt;FilesMatch \.cgi$&gt;
+&lt;FilesMatch "\.cgi$"&gt;
   SetHandler cgi-script
 &lt;/FilesMatch&gt;
     </highlight>
@@ -519,19 +519,19 @@ responses from the server</description>
     <highlight language="config">
 # Effective filter "DEFLATE"
 AddOutputFilter DEFLATE shtml
-&lt;Location /foo&gt;
+&lt;Location "/foo"&gt;
   # Effective filter "INCLUDES", replacing "DEFLATE"
   AddOutputFilter INCLUDES shtml
 &lt;/Location&gt;
-&lt;Location /bar&gt;
+&lt;Location "/bar"&gt;
   # Effective filter "INCLUDES;DEFLATE", replacing "DEFLATE"
   AddOutputFilter INCLUDES;DEFLATE shtml
 &lt;/Location&gt;
-&lt;Location /bar/baz&gt;
+&lt;Location "/bar/baz"&gt;
   # Effective filter "BUFFER", replacing "INCLUDES;DEFLATE"
   AddOutputFilter BUFFER shtml
 &lt;/Location&gt;
-&lt;Location /bar/baz/buz&gt;
+&lt;Location "/bar/baz/buz"&gt;
   # No effective filter, replacing "BUFFER"
   RemoveOutputFilter shtml
 &lt;/Location&gt;
@@ -792,7 +792,7 @@ extensions</description>
     <highlight language="config">
 AddEncoding x-gzip .gz
 AddType text/plain .asc
-&lt;Files *.gz.asc&gt;
+&lt;Files "*.gz.asc"&gt;
     RemoveEncoding .gz
 &lt;/Files&gt;
       </highlight>
index 2266ae22d37b0ceb6786ac09c0957234ac0ae303..75d4ec895ba5140717e5d15c43b1f624dcae0a6b 100644 (file)
 
     <example><title>Reverse Proxy</title>
     <highlight language="config">
-ProxyPass /foo http://foo.example.com/bar
-ProxyPassReverse /foo http://foo.example.com/bar
+ProxyPass "/foo" "http://foo.example.com/bar"
+ProxyPassReverse "/foo" "http://foo.example.com/bar"
     </highlight>
     </example>
 
@@ -164,7 +164,7 @@ ProxyPassReverse /foo http://foo.example.com/bar
 ProxyRequests On
 ProxyVia On
 
-&lt;Proxy *&gt;
+&lt;Proxy "*"&gt;
   Require host internal.example.com
 &lt;/Proxy&gt;
     </highlight>
@@ -181,7 +181,7 @@ ProxyVia On
 
       <example><title>Reverse Proxy PHP scripts</title>
       <highlight language="config">
-&lt;FilesMatch \.php$&gt;
+&lt;FilesMatch "\.php$"&gt;
     # Unix sockets require 2.4.7 or later
     SetHandler  "proxy:unix:/path/to/app.sock|fcgi://localhost/"
 &lt;/FilesMatch&gt;
@@ -212,7 +212,7 @@ ProxyVia On
       for a reverse proxy:</p>
 
       <highlight language="config">
-          ProxyPass /example http://backend.example.com connectiontimeout=5 timeout=30
+          ProxyPass "/example" "http://backend.example.com" connectiontimeout=5 timeout=30
       </highlight>
 
       <p>This will create a worker associated with the origin server URL
@@ -221,14 +221,14 @@ ProxyVia On
       via the <directive module="mod_proxy">ProxySet</directive> directive:</p>
 
       <highlight language="config">
-          ProxySet http://backend.example.com connectiontimeout=5 timeout=30
+          ProxySet "http://backend.example.com" connectiontimeout=5 timeout=30
       </highlight>
 
       <p>or alternatively using <directive module="mod_proxy">Proxy</directive>
       and <directive module="mod_proxy">ProxySet</directive>:</p>
 
       <highlight language="config">
-&lt;Proxy http://backend.example.com&gt;
+&lt;Proxy "http://backend.example.com"&gt;
   ProxySet connectiontimeout=5 timeout=30
 &lt;/Proxy&gt;
       </highlight>
@@ -248,8 +248,8 @@ ProxyVia On
       origin server including any path components given:</p>
 
      <highlight language="config">
-ProxyPass /examples http://backend.example.com/examples
-ProxyPass /docs http://backend.example.com/docs
+ProxyPass "/examples" "http://backend.example.com/examples"
+ProxyPass "/docs" "http://backend.example.com/docs"
       </highlight>
 
       <p>This example defines two different workers, each using a separate
@@ -261,8 +261,8 @@ ProxyPass /docs http://backend.example.com/docs
         worker defined later in the configuration file. In the following example</p>
 
         <highlight language="config">
-ProxyPass /apps http://backend.example.com/ timeout=60
-ProxyPass /examples http://backend.example.com/examples timeout=10
+ProxyPass "/apps" "http://backend.example.com/" timeout=60
+ProxyPass "/examples" "http://backend.example.com/examples" timeout=10
         </highlight>
 
         <p>the second worker isn't actually created. Instead the first
@@ -311,7 +311,7 @@ ProxyPass /examples http://backend.example.com/examples timeout=10
       the following example:</p>
 
       <highlight language="config">
-&lt;Proxy *&gt;
+&lt;Proxy "*"&gt;
   Require ip 192.168.0
 &lt;/Proxy&gt;
       </highlight>
@@ -379,8 +379,8 @@ ProxyPass /examples http://backend.example.com/examples timeout=10
       <code>proxy-nokeepalive</code> notes.</p>
 
       <highlight language="config">
-&lt;Location /buggyappserver/&gt;
-  ProxyPass http://buggyappserver:7001/foo/
+&lt;Location "/buggyappserver/"&gt;
+  ProxyPass "http://buggyappserver:7001/foo/"
   SetEnv force-proxy-request-1.0 1
   SetEnv proxy-nokeepalive 1
 &lt;/Location&gt;
@@ -476,7 +476,7 @@ ProxyPass /examples http://backend.example.com/examples timeout=10
     server:</p>
 
     <highlight language="config">
-&lt;Proxy *&gt;
+&lt;Proxy "*"&gt;
   Require host yournetwork.example.com
 &lt;/Proxy&gt;
     </highlight>
@@ -486,7 +486,7 @@ ProxyPass /examples http://backend.example.com/examples timeout=10
     filter when they are sent through the proxy server:</p>
 
    <highlight language="config">    
-&lt;Proxy http://example.com/foo/*&gt;
+&lt;Proxy "http://example.com/foo/*"&gt;
   SetOutputFilter INCLUDES
 &lt;/Proxy&gt;
     </highlight>
@@ -495,7 +495,7 @@ ProxyPass /examples http://backend.example.com/examples timeout=10
       <p>A backend URL matches the configuration section if it begins with the 
       the <var>wildcard-url</var> string, even if the last path segment in the
       directive only matches a prefix of the backend URL.  For example, 
-      &lt;Proxy http://example.com/foo&gt; matches all of 
+      &lt;Proxy "http://example.com/foo"&gt; matches all of 
       http://example.com/foo, http://example.com/foo/bar, and 
       http://example.com/foobar.  The matching of the final URL differs
       from the behavior of the <directive type="section" module="core"
@@ -562,7 +562,7 @@ proxied resources</description>
     (unnamed) backreferences are ignored. Use named groups instead.</p>
 
 <highlight language="config">
-&lt;ProxyMatch ^http://(?&lt;sitename&gt;[^/]+)&gt;
+&lt;ProxyMatch "^http://(?&lt;sitename&gt;[^/]+)"&gt;
     Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
 &lt;/ProxyMatch&gt;
 </highlight>
@@ -654,9 +654,9 @@ context in 2.3.3 and later.</compatibility>
 
     <example><title>Example</title>
     <highlight language="config">
-ProxyRemote http://goodguys.example.com/ http://mirrorguys.example.com:8000
-ProxyRemote * http://cleverproxy.localdomain
-ProxyRemote ftp http://ftpproxy.mydomain:8080
+ProxyRemote "http://goodguys.example.com/" "http://mirrorguys.example.com:8000"
+ProxyRemote "*" "http://cleverproxy.localdomain"
+ProxyRemote "ftp" "http://ftpproxy.mydomain:8080"
     </highlight>
     </example>
 
@@ -803,26 +803,26 @@ expressions</description>
 
     <example>
         <highlight language="config">
-&lt;Proxy balancer://hotcluster&gt;
-    BalancerMember http://www2.example.com:8080 loadfactor=1
-    BalancerMember http://www3.example.com:8080 loadfactor=2
+&lt;Proxy "balancer://hotcluster"&gt;
+    BalancerMember "http://www2.example.com:8080" loadfactor=1
+    BalancerMember "http://www3.example.com:8080" loadfactor=2
     ProxySet lbmethod=bytraffic
 &lt;/Proxy&gt;
       </highlight>
     </example>
 
     <highlight language="config">
-&lt;Proxy http://backend&gt;
+&lt;Proxy "http://backend"&gt;
     ProxySet keepalive=On
 &lt;/Proxy&gt;
     </highlight>
 
     <highlight language="config">
-        ProxySet balancer://foo lbmethod=bytraffic timeout=15
+        ProxySet "balancer://foo" lbmethod=bytraffic timeout=15
     </highlight>
 
     <highlight language="config">
-        ProxySet ajp://backend:7001 timeout=15
+        ProxySet "ajp://backend:7001" timeout=15
     </highlight>
 
    <note type="warning"><title>Warning</title>
@@ -873,8 +873,8 @@ expressions</description>
     then</p>
 
     <highlight language="config">
-&lt;Location /mirror/foo/&gt;
-    ProxyPass http://backend.example.com/
+&lt;Location "/mirror/foo/"&gt;
+    ProxyPass "http://backend.example.com/"
 &lt;/Location&gt;
     </highlight>
 
@@ -888,7 +888,7 @@ expressions</description>
     <a href="mod_proxy_balancer.html#balancer_manager">Balancer Manager</a> interface:</p>
 
     <highlight language="config">
-        ProxyPass /mirror/foo/ http://backend.example.com/
+        ProxyPass "/mirror/foo/" "http://backend.example.com/"
     </highlight>
 
     <note type="warning">
@@ -903,17 +903,17 @@ expressions</description>
     to reverse-proxy a subdirectory, <em>e.g.</em></p>
 
     <highlight language="config">
-&lt;Location /mirror/foo/&gt;
-    ProxyPass http://backend.example.com/
+&lt;Location "/mirror/foo/"&gt;
+    ProxyPass "http://backend.example.com/"
 &lt;/Location&gt;
-&lt;Location /mirror/foo/i&gt;
-    ProxyPass !
+&lt;Location "/mirror/foo/i"&gt;
+    ProxyPass "!"
 &lt;/Location&gt;
     </highlight>
 
     <highlight language="config">
-ProxyPass /mirror/foo/i !
-ProxyPass /mirror/foo http://backend.example.com
+ProxyPass "/mirror/foo/i" "!"
+ProxyPass "/mirror/foo" "http://backend.example.com"
     </highlight>
 
     <p>will proxy all requests to <code>/mirror/foo</code> to
@@ -962,7 +962,7 @@ ProxyPass /mirror/foo http://backend.example.com
 
     <example><title>Example</title>
         <highlight language="config">
-        ProxyPass /example http://backend.example.com max=20 ttl=120 retry=300
+        ProxyPass "/example" "http://backend.example.com" max=20 ttl=120 retry=300
         </highlight>
     </example>
 
@@ -1250,25 +1250,25 @@ ProxyPass /mirror/foo http://backend.example.com
     </table>
     <p>A sample balancer setup</p>
     <highlight language="config">
-ProxyPass /special-area http://special.example.com smax=5 max=10
-ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On
-&lt;Proxy balancer://mycluster&gt;
-    BalancerMember ajp://1.2.3.4:8009
-    BalancerMember ajp://1.2.3.5:8009 loadfactor=20
+ProxyPass "/special-area" "http://special.example.com" smax=5 max=10
+ProxyPass "/" "balancer://mycluster/" stickysession=JSESSIONID|jsessionid nofailover=On
+&lt;Proxy "balancer://mycluster"&gt;
+    BalancerMember "ajp://1.2.3.4:8009"
+    BalancerMember "ajp://1.2.3.5:8009" loadfactor=20
     # Less powerful server, don't send as many requests there,
-    BalancerMember ajp://1.2.3.6:8009 loadfactor=5
+    BalancerMember "ajp://1.2.3.6:8009" loadfactor=5
 &lt;/Proxy&gt;
     </highlight>
 
     <p>Setting up a hot-standby, that will only be used if no other
      members are available</p>
     <highlight language="config">
-ProxyPass / balancer://hotcluster/
-&lt;Proxy balancer://hotcluster&gt;
-    BalancerMember ajp://1.2.3.4:8009 loadfactor=1
-    BalancerMember ajp://1.2.3.5:8009 loadfactor=2
+ProxyPass "/" "balancer://hotcluster/"
+&lt;Proxy "balancer://hotcluster"&gt;
+    BalancerMember "ajp://1.2.3.4:8009" loadfactor=1
+    BalancerMember "ajp://1.2.3.5:8009" loadfactor=2
     # The server below is on hot standby
-    BalancerMember ajp://1.2.3.6:8009 status=+H
+    BalancerMember "ajp://1.2.3.6:8009" status=+H
     ProxySet lbmethod=bytraffic
 &lt;/Proxy&gt;
     </highlight>
@@ -1316,14 +1316,14 @@ ProxyPass / balancer://hotcluster/
     <highlight language="config">
 RewriteEngine On
 
-RewriteCond %{HTTPS} =off
-RewriteRule . - [E=protocol:http]
-RewriteCond %{HTTPS} =on
-RewriteRule . - [E=protocol:https]
+RewriteCond "%{HTTPS}" =off
+RewriteRule "." "-" [E=protocol:http]
+RewriteCond "%{HTTPS}" =on
+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/
+RewriteRule "^/mirror/foo/(.*)" "%{ENV:protocol}://backend.example.com/$1" [P]
+ProxyPassReverse  "/mirror/foo/" "http://backend.example.com/"
+ProxyPassReverse  "/mirror/foo/" "https://backend.example.com/"
     </highlight>
 </usage>
 </directivesynopsis>
@@ -1351,7 +1351,7 @@ ProxyPassReverse  /mirror/foo/ https://backend.example.com/
     then</p>
 
     <highlight language="config">
-      ProxyPassMatch ^/(.*\.gif)$ http://backend.example.com/$1
+      ProxyPassMatch "^/(.*\.gif)$" "http://backend.example.com/$1"
     </highlight>
 
     <p>will cause a local request for
@@ -1362,13 +1362,13 @@ ProxyPassReverse  /mirror/foo/ https://backend.example.com/
       substitutions (as well as after).  This limits the matches you can use.
       For instance, if we had used</p>
       <highlight language="config">
-        ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com:8000$1
+        ProxyPassMatch "^(/.*\.gif)$" "http://backend.example.com:8000$1"
       </highlight>
       <p>in our previous example, it would fail with a syntax error
       at server startup.  This is a bug (PR 46665 in the ASF bugzilla),
       and the workaround is to reformulate the match:</p>
       <highlight language="config">
-        ProxyPassMatch ^/(.*\.gif)$ http://backend.example.com:8000/$1
+        ProxyPassMatch "^/(.*\.gif)$" "http://backend.example.com:8000/$1"
       </highlight>
     </note>
     <p>The <code>!</code> directive is useful in situations where you don't want
@@ -1435,10 +1435,10 @@ proxied server</description>
     <code>http://example.com/</code>; then</p>
 
     <highlight language="config">
-ProxyPass         /mirror/foo/ http://backend.example.com/
-ProxyPassReverse  /mirror/foo/ http://backend.example.com/
-ProxyPassReverseCookieDomain  backend.example.com  public.example.com
-ProxyPassReverseCookiePath  /  /mirror/foo/
+ProxyPass         "/mirror/foo/" "http://backend.example.com/"
+ProxyPassReverse  "/mirror/foo/" "http://backend.example.com/"
+ProxyPassReverseCookieDomain  "backend.example.com"  "public.example.com"
+ProxyPassReverseCookiePath  "/"  "/mirror/foo/"
     </highlight>
 
     <p>will not only cause a local request for the
@@ -1522,7 +1522,7 @@ In the example given with
 <directive module="mod_proxy">ProxyPassReverse</directive>, the directive:
 </p>
     <highlight language="config">
-      ProxyPassReverseCookiePath  /  /mirror/foo/
+      ProxyPassReverseCookiePath  "/"  "/mirror/foo/"
     </highlight>
 <p>
 will rewrite a cookie with backend path <code>/</code> (or
@@ -1551,7 +1551,7 @@ proxied</description>
 
     <example><title>Example</title>
     <highlight language="config">
-      ProxyBlock news.example.com auctions.example.com friends.example.com
+      ProxyBlock "news.example.com" "auctions.example.com" "friends.example.com"
       </highlight>
     </example>
 
@@ -1563,7 +1563,7 @@ proxied</description>
     <p>Note also that</p>
 
     <highlight language="config">
-      ProxyBlock *
+      ProxyBlock "*"
     </highlight>
 
     <p>blocks connections to all sites.</p>
@@ -1673,8 +1673,8 @@ directly</description>
 
     <example><title>Example</title>
     <highlight language="config">
-ProxyRemote  *  http://firewall.example.com:81
-NoProxy         .example.com 192.168.112.0/21
+ProxyRemote  "*"  "http://firewall.example.com:81"
+NoProxy         ".example.com" "192.168.112.0/21"
     </highlight>
     </example>
 
@@ -1814,9 +1814,9 @@ NoProxy         .example.com 192.168.112.0/21
 
     <example><title>Example</title>
     <highlight language="config">
-      ProxyRemote  *  http://firewall.example.com:81<br />
-      NoProxy         .example.com 192.168.112.0/21<br />
-      ProxyDomain     .example.com
+      ProxyRemote  "*"  "http://firewall.example.com:81"<br />
+      NoProxy         ".example.com" "192.168.112.0/21"<br />
+      ProxyDomain     ".example.com"
       </highlight>
     </example>
 </usage>
index 63c3707f82c741c689ac7ee509ec04407ed3f1f5..9cd0e7060d9557c8368f0f3f72fef871b1672763 100644 (file)
 
     <example><title>Simple Reverse Proxy</title>
     <highlight language="config">
-    ProxyPass /app ajp://backend.example.com:8009/app
+    ProxyPass "/app" "ajp://backend.example.com:8009/app"
     </highlight>
     </example>
 
     <p>Balancers may also be used:</p>
     <example><title>Balancer Reverse Proxy</title>
     <highlight language="config">
-&lt;Proxy balancer://cluster&gt;
-    BalancerMember ajp://app1.example.com:8009 loadfactor=1
-    BalancerMember ajp://app2.example.com:8009 loadfactor=2
+&lt;Proxy "balancer://cluster"&gt;
+    BalancerMember "ajp://app1.example.com:8009" loadfactor=1
+    BalancerMember "ajp://app2.example.com:8009" loadfactor=2
     ProxySet lbmethod=bytraffic
 &lt;/Proxy&gt;
-ProxyPass /app balancer://cluster/app
+ProxyPass "/app" "balancer://cluster/app"
       </highlight>
     </example>
 
@@ -88,8 +88,8 @@ ProxyPass /app balancer://cluster/app
     example:</p>
     <example><title>Rewriting Proxied Path</title>
     <highlight language="config">
-ProxyPass /apps/foo ajp://backend.example.com:8009/foo
-ProxyPassReverse /apps/foo http://www.example.com/foo
+ProxyPass "/apps/foo" "ajp://backend.example.com:8009/foo"
+ProxyPassReverse "/apps/foo" "http://www.example.com/foo"
     </highlight>
     </example>
     <p>However, it is usually better to deploy the application on the backend
index fe03a922614803233f307a5111f85a8c462b9ef4..5e42c9ca8c7057bb4516cdccecbef8bece33c346 100644 (file)
     </p>
 
     <highlight language="config">
-&lt;Proxy balancer://mycluster&gt;
-    BalancerMember http://192.168.1.50:80
-    BalancerMember http://192.168.1.51:80
+&lt;Proxy "balancer://mycluster"&gt;
+    BalancerMember "http://192.168.1.50:80"
+    BalancerMember "http://192.168.1.51:80"
 &lt;/Proxy&gt;
-ProxyPass /test balancer://mycluster
-ProxyPassReverse /test balancer://mycluster
+ProxyPass "/test" "balancer://mycluster"
+ProxyPassReverse "/test" "balancer://mycluster"
     </highlight>
 
     <p>Another example of how to provide load balancing with stickyness
@@ -107,13 +107,13 @@ ProxyPassReverse /test balancer://mycluster
 
     <highlight language="config">
 Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
-&lt;Proxy balancer://mycluster&gt;
-    BalancerMember http://192.168.1.50:80 route=1
-    BalancerMember http://192.168.1.51:80 route=2
+&lt;Proxy "balancer://mycluster"&gt;
+    BalancerMember "http://192.168.1.50:80" route=1
+    BalancerMember "http://192.168.1.51:80" route=2
     ProxySet stickysession=ROUTEID
 &lt;/Proxy&gt;
-ProxyPass /test balancer://mycluster
-ProxyPassReverse /test balancer://mycluster
+ProxyPass "/test" "balancer://mycluster"
+ProxyPassReverse "/test" "balancer://mycluster"
     </highlight>
 </section>
 
@@ -188,7 +188,7 @@ ProxyPassReverse /test balancer://mycluster
     domain add this code to your <code>httpd.conf</code>
     configuration file</p>
 <highlight language="config">
-&lt;Location /balancer-manager&gt;
+&lt;Location "/balancer-manager"&gt;
     SetHandler balancer-manager
     Require host example.com
 &lt;/Location&gt;
@@ -249,10 +249,10 @@ ProxyPassReverse /test balancer://mycluster
     configuring the name of the cookie and the name of the URL parameter
     separated by a vertical bar (<code>|</code>) as in the following example:</p>
     <highlight language="config">
-ProxyPass /test balancer://mycluster stickysession=JSESSIONID|jsessionid scolonpathdelim=On
-&lt;Proxy balancer://mycluster&gt;
-    BalancerMember http://192.168.1.50:80 route=node1
-    BalancerMember http://192.168.1.51:80 route=node2
+ProxyPass "/test" "balancer://mycluster" stickysession=JSESSIONID|jsessionid scolonpathdelim=On
+&lt;Proxy "balancer://mycluster"&gt;
+    BalancerMember "http://192.168.1.50:80" route=node1
+    BalancerMember "http://192.168.1.51:80" route=node2
 &lt;/Proxy&gt;
     </highlight>
     <p>If the cookie and the request parameter both provide routing information
index 2d8d44086db675f6f802194dd8f20d8f04069f31..9b8c3e27ca3cf6f3fbdf5f17e696701bbe2c32aa 100644 (file)
@@ -64,8 +64,8 @@
       <highlight language="config">
 &lt;VirtualHost *:80&gt;
    ServerName front.end.server
-   ProxyPass / back.end.server:port
-   ProxyPassReverse / back.end.server:port
+   ProxyPass "/" "back.end.server:port"
+   ProxyPassReverse "/" "back.end.server:port"
 &lt;/VirtualHost&gt;
       </highlight>
       That is, the entire URL is appended to the mapped backend
index fa0699efa26c7c42f1855e3ae7ab19159ddc75f5..cb638acfa564747e66d514cf2ad3656162035473 100644 (file)
@@ -65,7 +65,7 @@
 
     <example><title>Single application instance</title>
     <highlight language="config">
-      ProxyPass /myapp/ fcgi://localhost:4000/
+      ProxyPass "/myapp/" "fcgi://localhost:4000/"
       </highlight>
     </example>
 
@@ -78,7 +78,7 @@
 
     <example><title>Single application instance, connection reuse (2.4.11 and later)</title>
     <highlight language="config">
-      ProxyPass /myapp/ fcgi://localhost:4000/ enablereuse=on
+      ProxyPass "/myapp/" "fcgi://localhost:4000/" enablereuse=on
       </highlight>
     </example>
 
@@ -88,7 +88,7 @@
     PHP-FPM is listening.  Connection pooling is enabled.</p>
     <example><title>PHP-FPM</title>
     <highlight language="config">
-      ProxyPassMatch ^/myapp/.*\.php(/.*)?$ fcgi://localhost:9000/var/www/ enablereuse=on
+      ProxyPassMatch "^/myapp/.*\.php(/.*)?$" "fcgi://localhost:9000/var/www/" enablereuse=on
     </highlight>
     </example>
 
@@ -99,7 +99,7 @@
     <example><title>PHP-FPM with UDS</title>
     <highlight language="config">
       # UDS does not currently support connection reuse
-      ProxyPassMatch ^/(.*\.php(/.*)?)$ "unix:/var/run/php5-fpm.sock|fcgi://localhost/var/www/" 
+      ProxyPassMatch "^/(.*\.php(/.*)?)$" "unix:/var/run/php5-fpm.sock|fcgi://localhost/var/www/" 
     </highlight>
     </example>
 
 
     <example><title>Balanced gateway to multiple application instances</title>
     <highlight language="config">
-ProxyPass /myapp/ balancer://myappcluster/
-&lt;Proxy balancer://myappcluster/&gt;
-    BalancerMember fcgi://localhost:4000
-    BalancerMember fcgi://localhost:4001
+ProxyPass "/myapp/" "balancer://myappcluster/"
+&lt;Proxy "balancer://myappcluster/"&gt;
+    BalancerMember "fcgi://localhost:4000"
+    BalancerMember "fcgi://localhost:4001"
 &lt;/Proxy&gt;
     </highlight>
     </example>
@@ -133,7 +133,7 @@ ProxyPass /myapp/ balancer://myappcluster/
       </p>
     <example><title>Proxy via Handler</title>
       <highlight language="config">
-&lt;FilesMatch \.php$&gt;
+&lt;FilesMatch "\.php$"&gt;
     # Note: The only part that varies is /path/to/app.sock
     SetHandler  "proxy:unix:/path/to/app.sock|fcgi://localhost/"
 &lt;/FilesMatch&gt;
@@ -141,7 +141,7 @@ ProxyPass /myapp/ balancer://myappcluster/
    # The part that is matched to the SetHandler is the part that 
    # follows the pipe. If you need to distinguish, "localhost; can
    # be anything unique.
-   &lt;Proxy fcgi://localhost/ enablereuse=on max=10&gt;
+   &lt;Proxy "fcgi://localhost/" enablereuse=on max=10&gt;
    &lt;/Proxy&gt;
 
 &lt;FilesMatch ...&gt;
index 218e02cd302fcfc74ca3966a6985f7b3fc804eeb..a5ebc7e7c76aceec4b5ed038dd6f12309bbfa877 100644 (file)
 
     <example><title>Balanced gateway</title>
     <highlight language="config">
-ProxyPass /scgi-bin/ balancer://somecluster/
-&lt;Proxy balancer://somecluster&gt;
-    BalancerMember scgi://localhost:4000
-    BalancerMember scgi://localhost:4001
+ProxyPass "/scgi-bin/" "balancer://somecluster/"
+&lt;Proxy "balancer://somecluster"&gt;
+    BalancerMember "scgi://localhost:4000"
+    BalancerMember "scgi://localhost:4001"
 &lt;/Proxy&gt;
     </highlight>
     </example>
index 4bef799633a617af8ba53dd66ca6e0919f38c6fa..588c531533ea89337016fef4317733f827b4caf1 100644 (file)
@@ -44,8 +44,8 @@ Connection: Upgrade
 
     <example><title>Proxying requests to websockets server</title>
     <highlight language="config">
-ProxyPass /ws2/  ws://echo.websocket.org/
-ProxyPass /wss2/ wss://echo.websocket.org/
+ProxyPass "/ws2/"  "ws://echo.websocket.org/"
+ProxyPass "/wss2/" "wss://echo.websocket.org/"
     </highlight>
     </example>
 
index e386dd581d9d5c60e7aca94b6924f31be2d022d4..5cac06cbf846a7c4d18de4ce20f0c9fc11bf027e 100644 (file)
@@ -39,7 +39,7 @@ variable <code>rate-limit</code>.</p>
 
 <example><title>Example Configuration</title>
 <highlight language="config">
-&lt;Location /downloads&gt;
+&lt;Location "/downloads"&gt;
     SetOutputFilter RATE_LIMIT
     SetEnv rate-limit 400 
 &lt;/Location&gt;
index 17e5d2c813a320a883b12d6e8fa28e2bc84ae416..06e44967832923e55c621c8a121dc201604c825b 100644 (file)
@@ -44,7 +44,7 @@
     body. This request requires a Content-Encoding request header containing
     "gzip" for the filter to return compressed data.
     <highlight language="config">
-&lt;Location /compress&gt;
+&lt;Location "/compress"&gt;
     SetHandler reflector
     SetOutputFilter DEFLATE
 &lt;/Location&gt;
@@ -55,7 +55,7 @@
     <dd>Pass the request body through an image downsampling filter, and reflect
     the results to the caller.
     <highlight language="config">
-&lt;Location /downsample&gt;
+&lt;Location "/downsample"&gt;
     SetHandler reflector
     SetOutputFilter DOWNSAMPLE
 &lt;/Location&gt;
index 75f35a43db774ed31cb0d6676d460312c679de4d..185a82c53e66b206cb4a828edccd3350d9f508ce 100644 (file)
@@ -321,14 +321,14 @@ later</compatibility>
       <directive>RewriteMap</directive> as:</p>
 
       <highlight language="config">
-      RewriteMap examplemap txt:/path/to/file/map.txt
+      RewriteMap "examplemap" "txt:/path/to/file/map.txt"
       </highlight>
 
       <p>You would then be able to use this map in a
       <directive>RewriteRule</directive> as follows:</p>
 
       <highlight language="config">
-      RewriteRule ^/ex/(.*) ${examplemap:$1}
+      RewriteRule "^/ex/(.*)" "${examplemap:$1}"
       </highlight>
 
       <p>The following combinations for <em>MapType</em> and
@@ -407,12 +407,12 @@ later</compatibility>
     misconfiguration would normally cause the server to look for an "opt"
     directory under the document root.</p>
 <highlight language="config">
-DocumentRoot /var/www/example.com
-AliasMatch ^/myapp /opt/myapp-1.2.3
-&lt;Directory /opt/myapp-1.2.3&gt;
+DocumentRoot "/var/www/example.com"
+AliasMatch "^/myapp" "/opt/myapp-1.2.3"
+&lt;Directory "/opt/myapp-1.2.3"&gt;
     RewriteEngine On
     RewriteBase /myapp/
-    RewriteRule ^index\.html$  welcome.html 
+    RewriteRule "^index\.html$"  "welcome.html"
 &lt;/Directory&gt;
 </highlight>
 
@@ -920,7 +920,7 @@ AliasMatch ^/myapp /opt/myapp-1.2.3
 
            <highlight language="config">
            RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'"<br />
-           RewriteRule ^/images - [F]
+           RewriteRule "^/images" "-" [F]
            </highlight>
         </li>
 
@@ -948,9 +948,9 @@ AliasMatch ^/myapp /opt/myapp-1.2.3
           instead of the implicit AND. Typical example:
 
 <highlight language="config">
-RewriteCond %{REMOTE_HOST}  ^host1  [OR]
-RewriteCond %{REMOTE_HOST}  ^host2  [OR]
-RewriteCond %{REMOTE_HOST}  ^host3
+RewriteCond "%{REMOTE_HOST}"  "^host1"  [OR]
+RewriteCond "%{REMOTE_HOST}"  "^host2"  [OR]
+RewriteCond "%{REMOTE_HOST}"  "^host3"
 RewriteRule ...some special stuff for any of these hosts...
 </highlight>
 
@@ -978,10 +978,10 @@ RewriteRule ...some special stuff for any of these hosts...
         use the following: </p>
 
 <highlight language="config">
-RewriteCond  %{HTTP_USER_AGENT}  (iPhone|Blackberry|Android)
-RewriteRule  ^/$                 /homepage.mobile.html  [L]
+RewriteCond  "%{HTTP_USER_AGENT}"  "(iPhone|Blackberry|Android)"
+RewriteRule  "^/$"                 "/homepage.mobile.html"  [L]
 
-RewriteRule  ^/$                 /homepage.std.html  [L]
+RewriteRule  "^/$"                 "/homepage.std.html"  [L]
 </highlight>
 
         <p>Explanation: If you use a browser which identifies itself
index 963c0f0ccb2abd814c50d930c439fe3c17413c7c..dc48a96b7570641b58fe4705260c0c49247161de 100644 (file)
@@ -261,7 +261,7 @@ Session On
 SessionCryptoPassphrase secret
 SessionCookieName session path=/
 AuthFormProvider file
-AuthUserFile conf/passwd
+AuthUserFile "conf/passwd"
 AuthType form
 AuthName realm
 #...
index 4219c2f66c6fd950bfd0c0afe0933626d712e579..959b522684d158e07135dfa50d09c6f58657fbdd 100644 (file)
@@ -97,7 +97,7 @@ module</description>
       directory names.</li>
 
       <li>spelling corrections apply strictly to existing files, so
-      a request for the <code>&lt;Location /status&gt;</code> may
+      a request for the <code>&lt;Location "/status"&gt;</code> may
       get incorrectly treated as the negotiated file
       "<code>/stats.html</code>".</li>
     </ul>
index e697645b93141735016b7a9a7b67c7a2776539dc..780429bc75f2ea8fd8d6efbb71b7cd1ef1e612cc 100644 (file)
@@ -174,7 +174,7 @@ provided. Information about this function is provided in the <a
 href="../ssl/ssl_compat.html">Compatibility</a> chapter.</p>
 <example><title>Example</title>
 <highlight language="config">
-CustomLog logs/ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
+CustomLog "logs/ssl_request_log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
 </highlight>
 </example>
 </section>
@@ -322,7 +322,7 @@ query can be done in two ways which can be configured by
 </ul>
 <example><title>Example</title>
 <highlight language="config">
-SSLPassPhraseDialog exec:/usr/local/apache/sbin/pp-filter
+SSLPassPhraseDialog "exec:/usr/local/apache/sbin/pp-filter"
 </highlight>
 </example>
 </usage>
@@ -405,12 +405,12 @@ The following <em>source</em> variants are available:</p>
 <example><title>Example</title>
 <highlight language="config">
 SSLRandomSeed startup builtin
-SSLRandomSeed startup file:/dev/random
-SSLRandomSeed startup file:/dev/urandom 1024
-SSLRandomSeed startup exec:/usr/local/bin/truerand 16
+SSLRandomSeed startup "file:/dev/random"
+SSLRandomSeed startup "file:/dev/urandom" 1024
+SSLRandomSeed startup "exec:/usr/local/bin/truerand" 16
 SSLRandomSeed connect builtin
-SSLRandomSeed connect file:/dev/random
-SSLRandomSeed connect file:/dev/urandom 1024
+SSLRandomSeed connect "file:/dev/random"
+SSLRandomSeed connect "file:/dev/urandom" 1024
 </highlight>
 </example>
 </usage>
@@ -483,8 +483,8 @@ The following five storage <em>type</em>s are currently supported:</p>
 
 <example><title>Examples</title>
 <highlight language="config">
-SSLSessionCache dbm:/usr/local/apache/logs/ssl_gcache_data
-SSLSessionCache shmcb:/usr/local/apache/logs/ssl_gcache_data(512000)
+SSLSessionCache "dbm:/usr/local/apache/logs/ssl_gcache_data"
+SSLSessionCache "shmcb:/usr/local/apache/logs/ssl_gcache_data(512000)"
 </highlight>
 </example>
 
@@ -866,7 +866,7 @@ such issues.
 
 <example><title>Example</title>
 <highlight language="config">
-SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crt
+SSLCertificateFile "/usr/local/apache2/conf/ssl.crt/server.crt"
 </highlight>
 </example>
 </usage>
@@ -896,7 +896,7 @@ directive.</p>
 
 <example><title>Example</title>
 <highlight language="config">
-SSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key
+SSLCertificateKeyFile "/usr/local/apache2/conf/ssl.key/server.key"
 </highlight>
 </example>
 </usage>
@@ -944,7 +944,7 @@ certificates use the <em>same</em> certificate chain. Else the browsers will be
 confused in this situation.</p>
 <example><title>Example</title>
 <highlight language="config">
-SSLCertificateChainFile /usr/local/apache2/conf/ssl.crt/ca.crt
+SSLCertificateChainFile "/usr/local/apache2/conf/ssl.crt/ca.crt"
 </highlight>
 </example>
 </usage>
@@ -971,7 +971,7 @@ there: you also have to create symbolic links named
 contains the appropriate symbolic links.</p>
 <example><title>Example</title>
 <highlight language="config">
-SSLCACertificatePath /usr/local/apache2/conf/ssl.crt/
+SSLCACertificatePath "/usr/local/apache2/conf/ssl.crt/"
 </highlight>
 </example>
 </usage>
@@ -995,7 +995,7 @@ preference. This can be used alternatively and/or additionally to
 <directive module="mod_ssl">SSLCACertificatePath</directive>.</p>
 <example><title>Example</title>
 <highlight language="config">
-SSLCACertificateFile /usr/local/apache2/conf/ssl.crt/ca-bundle-client.crt
+SSLCACertificateFile "/usr/local/apache2/conf/ssl.crt/ca-bundle-client.crt"
 </highlight>
 </example>
 </usage>
@@ -1042,7 +1042,7 @@ PEM-encoded CA certificates.</p>
 
 <example><title>Example</title>
 <highlight language="config">
-SSLCADNRequestFile /usr/local/apache2/conf/ca-names.crt
+SSLCADNRequestFile "/usr/local/apache2/conf/ca-names.crt"
 </highlight>
 </example>
 </usage>
@@ -1071,7 +1071,7 @@ Certificate files there: you also have to create symbolic links named
 this directory contains the appropriate symbolic links.</p>
 <example><title>Example</title>
 <highlight language="config">
-SSLCADNRequestPath /usr/local/apache2/conf/ca-names.crt/
+SSLCADNRequestPath "/usr/local/apache2/conf/ca-names.crt/"
 </highlight>
 </example>
 </usage>
@@ -1098,7 +1098,7 @@ Additionally you have to create symbolic links named
 contains the appropriate symbolic links.</p>
 <example><title>Example</title>
 <highlight language="config">
-SSLCARevocationPath /usr/local/apache2/conf/ssl.crl/
+SSLCARevocationPath "/usr/local/apache2/conf/ssl.crl/"
 </highlight>
 </example>
 </usage>
@@ -1123,7 +1123,7 @@ used alternatively and/or additionally to <directive
 module="mod_ssl">SSLCARevocationPath</directive>.</p>
 <example><title>Example</title>
 <highlight language="config">
-SSLCARevocationFile /usr/local/apache2/conf/ssl.crl/ca-bundle-client.crl
+SSLCARevocationFile "/usr/local/apache2/conf/ssl.crl/ca-bundle-client.crl"
 </highlight>
 </example>
 </usage>
@@ -1668,7 +1668,7 @@ directory contains the appropriate symbolic links.</p>
 </note>
 <example><title>Example</title>
 <highlight language="config">
-SSLProxyMachineCertificatePath /usr/local/apache2/conf/proxy.crt/
+SSLProxyMachineCertificatePath "/usr/local/apache2/conf/proxy.crt/"
 </highlight>
 </example>
 </usage>
@@ -1697,7 +1697,7 @@ or additionally to <code>SSLProxyMachineCertificatePath</code>.
 </note>
 <example><title>Example</title>
 <highlight language="config">
-SSLProxyMachineCertificateFile /usr/local/apache2/conf/ssl.crt/proxy.pem
+SSLProxyMachineCertificateFile "/usr/local/apache2/conf/ssl.crt/proxy.pem"
 </highlight>
 </example>
 </usage>
@@ -1729,7 +1729,7 @@ SSLProxyCACertificateFile</directive>.</p>
 </note>
 <example><title>Example</title>
 <highlight language="config">
-SSLProxyMachineCertificateChainFile /usr/local/apache2/conf/ssl.crt/proxyCA.pem
+SSLProxyMachineCertificateChainFile "/usr/local/apache2/conf/ssl.crt/proxyCA.pem"
 </highlight>
 </example>
 </usage>
@@ -1979,7 +1979,7 @@ there: you also have to create symbolic links named
 contains the appropriate symbolic links.</p>
 <example><title>Example</title>
 <highlight language="config">
-SSLProxyCACertificatePath /usr/local/apache2/conf/ssl.crt/
+SSLProxyCACertificatePath "/usr/local/apache2/conf/ssl.crt/"
 </highlight>
 </example>
 </usage>
@@ -2003,7 +2003,7 @@ preference. This can be used alternatively and/or additionally to
 <directive module="mod_ssl">SSLProxyCACertificatePath</directive>.</p>
 <example><title>Example</title>
 <highlight language="config">
-SSLProxyCACertificateFile /usr/local/apache2/conf/ssl.crt/ca-bundle-remote-server.crt
+SSLProxyCACertificateFile "/usr/local/apache2/conf/ssl.crt/ca-bundle-remote-server.crt"
 </highlight>
 </example>
 </usage>
@@ -2030,7 +2030,7 @@ Additionally you have to create symbolic links named
 contains the appropriate symbolic links.</p>
 <example><title>Example</title>
 <highlight language="config">
-SSLProxyCARevocationPath /usr/local/apache2/conf/ssl.crl/
+SSLProxyCARevocationPath "/usr/local/apache2/conf/ssl.crl/"
 </highlight>
 </example>
 </usage>
@@ -2055,7 +2055,7 @@ used alternatively and/or additionally to <directive
 module="mod_ssl">SSLProxyCARevocationPath</directive>.</p>
 <example><title>Example</title>
 <highlight language="config">
-SSLProxyCARevocationFile /usr/local/apache2/conf/ssl.crl/ca-bundle-remote-server.crl
+SSLProxyCARevocationFile "/usr/local/apache2/conf/ssl.crl/ca-bundle-remote-server.crl"
 </highlight>
 </example>
 </usage>
@@ -2201,7 +2201,7 @@ directives.</p>
 <highlight language="config">
 SSLVerifyClient on
 SSLOCSPEnable on
-SSLOCSPDefaultResponder http://responder.example.com:8888/responder
+SSLOCSPDefaultResponder "http://responder.example.com:8888/responder"
 SSLOCSPOverrideResponder on
 </highlight>
 </example>
@@ -2641,7 +2641,7 @@ may sometimes differ.</p>
 <highlight language="config">
 SSLOpenSSLConfCmd Options -SessionTicket,ServerPreference
 SSLOpenSSLConfCmd ECDHParameters brainpoolP256r1
-SSLOpenSSLConfCmd ServerInfoFile /usr/local/apache2/conf/server-info.pem
+SSLOpenSSLConfCmd ServerInfoFile "/usr/local/apache2/conf/server-info.pem"
 SSLOpenSSLConfCmd Protocol "-ALL, TLSv1.2"
 SSLOpenSSLConfCmd SignatureAlgorithms RSA+SHA384:ECDSA+SHA256
 </highlight>
index 12e94927b149e8879589a2073b109030f0a7d99d..fad50d078cbdec71224268da72149c1baee0910c 100644 (file)
@@ -78,7 +78,7 @@ performance</description>
     domain add this code to your <code>httpd.conf</code>
     configuration file</p>
 <highlight language="config">
-&lt;Location /server-status&gt;
+&lt;Location "/server-status"&gt;
     SetHandler server-status
     Require host example.com
 &lt;/Location&gt;
index 3e04ea7b0f9dfdc7ba90a81b95477e0f3133e66a..3eb5ed8afea62e30fed90c1ad6894590b26e4594 100644 (file)
@@ -72,9 +72,9 @@
 
     <example><title>Example</title>
     <highlight language="config">
-&lt;Location /&gt;
+&lt;Location "/"&gt;
     AddOutputFilterByType SUBSTITUTE text/html
-    Substitute s/foo/bar/ni
+    Substitute "s/foo/bar/ni"
 &lt;/Location&gt;
         </highlight>
     </example>
@@ -84,7 +84,7 @@
 
     <example><title>Example of using an alternate delimiter</title>
     <highlight language="config">
-&lt;Location /&gt;
+&lt;Location "/"&gt;
     AddOutputFilterByType SUBSTITUTE text/html
     Substitute "s|&lt;BR */?&gt;|&lt;br /&gt;|i"
 &lt;/Location&gt;
@@ -95,7 +95,7 @@
     when regular expressions are used, as illustrated in the following example: </p>
     <example><title>Example of using backreferences and captures</title>
     <highlight language="config">
-&lt;Location /&gt;
+&lt;Location "/"&gt;
     AddOutputFilterByType SUBSTITUTE text/html
     # "foo=k,bar=k" -> "foo/bar=k" 
     Substitute "s|foo=(\w+),bar=\1|foo/bar=$1"
 
     <example><title>Rewriting URLs embedded in proxied content</title>
     <highlight language="config">
-ProxyPass /blog/ http://internal.blog.example.com
-ProxyPassReverse /blog/ http://internal.blog.example.com/
+ProxyPass "/blog/" "http://internal.blog.example.com"
+ProxyPassReverse "/blog/" "http://internal.blog.example.com/"
 
 Substitute "s|http://internal.blog.example.com/|http://www.example.com/blog/|i"
     </highlight>
@@ -152,10 +152,10 @@ Substitute "s|http://internal.blog.example.com/|http://www.example.com/blog/|i"
 
     <example><title>Example</title>
     <highlight language="config">
-&lt;Location /&gt;
+&lt;Location "/"&gt;
     AddOutputFilterByType SUBSTITUTE text/html
     SubstituteMaxLineLength 10m
-    Substitute s/foo/bar/ni
+    Substitute "s/foo/bar/ni"
 &lt;/Location&gt;
         </highlight>
     </example>
index 4b7eb17c22c9ae773c0ce5e805ea7fe5d6d18218..d5d77edebf192e1638c334ae84442622c832d716 100644 (file)
@@ -45,8 +45,8 @@ hosting</description>
       /usr/local/apache2/cgi-bin/script.pl</code> in all cases:</p>
 
       <highlight language="config">
-ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/
-VirtualScriptAlias /never/found/%0/cgi-bin/
+ScriptAlias "/cgi-bin/" "/usr/local/apache2/cgi-bin/"
+VirtualScriptAlias "/never/found/%0/cgi-bin/"
       </highlight>
     </note>
 </summary>
@@ -128,7 +128,7 @@ VirtualScriptAlias /never/found/%0/cgi-bin/
 
     <highlight language="config">
 UseCanonicalName    Off
-VirtualDocumentRoot /usr/local/apache/vhosts/%0
+VirtualDocumentRoot "/usr/local/apache/vhosts/%0"
     </highlight>
 
     <p>A request for
@@ -144,7 +144,7 @@ VirtualDocumentRoot /usr/local/apache/vhosts/%0
 
     <highlight language="config">
 UseCanonicalName    Off
-VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2
+VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2"
     </highlight>
 
     <p>A request for
@@ -156,7 +156,7 @@ VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2
     end of the name, for example: </p>
 
 <highlight language="config">
-    VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.-1/%2.-2/%2.-3/%2
+    VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.-1/%2.-2/%2.-3/%2"
 </highlight>
 
     <p>The example request would come from
@@ -165,7 +165,7 @@ VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2
     <p>Alternatively you might use: </p>
 
 <highlight language="config">
-    VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2.4+
+    VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2.4+"
 </highlight>
 
     <p>The example request would come from
@@ -195,8 +195,8 @@ or <code>example.com</code> will all point to <code>/usr/local/apache/vhosts/exa
 
     <highlight language="config">
 UseCanonicalName DNS
-VirtualDocumentRootIP /usr/local/apache/vhosts/%1/%2/%3/%4/docs
-VirtualScriptAliasIP  /usr/local/apache/vhosts/%1/%2/%3/%4/cgi-bin
+VirtualDocumentRootIP "/usr/local/apache/vhosts/%1/%2/%3/%4/docs"
+VirtualScriptAliasIP  "/usr/local/apache/vhosts/%1/%2/%3/%4/cgi-bin"
     </highlight>
 
     <p>A request for
@@ -215,7 +215,7 @@ VirtualScriptAliasIP  /usr/local/apache/vhosts/%1/%2/%3/%4/cgi-bin
     the following way:</p>
 
 <highlight language="config">
-    VirtualDocumentRoot /usr/local/apache/vhosts/%2.0.%3.0
+    VirtualDocumentRoot "/usr/local/apache/vhosts/%2.0.%3.0"
 </highlight>
 
     <p>A request for
index c99031ab13cb948e05ae439ca24aa8d4ae71c00a..c4c3ba08dc47857442acf5f7e3b44539152a1259 100644 (file)
       <highlight language="config">
 RewriteEngine On
 RewriteMap lowercase int:tolower
-RewriteCond %{REQUEST_URI} [A-Z]
-RewriteRule (.*) ${lowercase:$1} [R,L]
+RewriteCond "%{REQUEST_URI}" "[A-Z]"
+RewriteRule "(.*)" "${lowercase:$1}" [R,L]
       </highlight></li>
 
       <li><p>When running, Apache needs write access only to the logs
@@ -585,10 +585,10 @@ RewriteRule (.*) ${lowercase:$1} [R,L]
 
   <dl>
     <dt>Mapped drive letters</dt>
-    <dd>e.g., <code>Alias /images/ Z:/</code></dd>
+    <dd>e.g., <code>Alias "/images/" "Z:/"</code></dd>
 
     <dt>UNC paths</dt>
-    <dd>e.g., <code>Alias /images/ //imagehost/www/images/</code></dd>
+    <dd>e.g., <code>Alias "/images/" "//imagehost/www/images/"</code></dd>
   </dl>
 
   <p>Mapped drive letters allow the administrator to maintain the
@@ -603,21 +603,21 @@ RewriteRule (.*) ${lowercase:$1} [R,L]
 
   <example><title>Example DocumentRoot with UNC path</title>
   <highlight language="config">
-  DocumentRoot //dochost/www/html/
+  DocumentRoot "//dochost/www/html/"
   </highlight>
   </example>
 
   <example><title>Example DocumentRoot with IP address in UNC path</title>
   <highlight language="config">
-  DocumentRoot //192.168.1.50/docs/
+  DocumentRoot "//192.168.1.50/docs/"
   </highlight>
   </example>
 
   <example><title>Example Alias and corresponding Directory with UNC path</title>
   <highlight language="config">
-Alias /images/ //imagehost/www/images/
+Alias "/images/" "//imagehost/www/images/"
 
-&lt;Directory //imagehost/www/images/&gt;
+&lt;Directory "//imagehost/www/images/"&gt;
 #...
 &lt;Directory&gt;
   </highlight>
index fddc0aad6b00979890e1785cb383e0330c8ba7de..650ad5c9db39cfeae37dce7e0ca12ee0d6562069 100644 (file)
@@ -84,27 +84,27 @@ configuration.</note>
 <!-- TODO: Add discussion here of why we have !^$ in there. -->
 
 <highlight language="config">
-RewriteCond %{HTTP_REFERER} !^$
-RewriteCond %{HTTP_REFERER} !www.example.com [NC]
-RewriteRule \.(gif|jpg|png)$    -   [F,NC]
+RewriteCond "%{HTTP_REFERER}" "!^$"
+RewriteCond "%{HTTP_REFERER}" "!www.example.com" [NC]
+RewriteRule "\.(gif|jpg|png)$"    "-"   [F,NC]
 </highlight>
 
     <p>In this second example, instead of failing the request, we display
     an alternate image instead.</p>
 
 <highlight language="config">
-RewriteCond %{HTTP_REFERER} !^$
-RewriteCond %{HTTP_REFERER} !www.example.com [NC]
-RewriteRule \.(gif|jpg|png)$    /images/go-away.png   [R,NC]
+RewriteCond "%{HTTP_REFERER}" "!^$"
+RewriteCond "%{HTTP_REFERER}" "!www.example.com" [NC]
+RewriteRule "\.(gif|jpg|png)$"    "/images/go-away.png"   [R,NC]
 </highlight>
 
     <p>In the third example, we redirect the request to an image on some
     other site.</p>
 
 <highlight language="config">
-RewriteCond %{HTTP_REFERER} !^$
-RewriteCond %{HTTP_REFERER} !www.example.com [NC]
-RewriteRule \.(gif|jpg|png)$ http://other.example.com/image.gif   [R,NC]
+RewriteCond "%{HTTP_REFERER}" "!^$"
+RewriteCond "%{HTTP_REFERER}" "!www.example.com" [NC]
+RewriteRule "\.(gif|jpg|png)$" "http://other.example.com/image.gif"   [R,NC]
 </highlight>
 
     <p>Of these techniques, the last two tend to be the most effective
@@ -121,8 +121,8 @@ RewriteRule \.(gif|jpg|png)$ http://other.example.com/image.gif   [R,NC]
         accomplished without the use of mod_rewrite:</p>
 
         <highlight language="config">
-SetEnvIf Referer example\.com localreferer
-&lt;FilesMatch \.(jpg|png|gif)$&gt;
+SetEnvIf Referer "example\.com" localreferer
+&lt;FilesMatch "\.(jpg|png|gif)$"&gt;
     Require env localreferer
 &lt;/FilesMatch&gt;
         </highlight>
@@ -169,9 +169,9 @@ SetEnvIf Referer example\.com localreferer
         particular source.</p>
 
 <highlight language="config">
-RewriteCond %{HTTP_USER_AGENT}   ^NameOfBadRobot
-RewriteCond %{REMOTE_ADDR}       =123\.45\.67\.[8-9]
-RewriteRule ^/secret/files/   -   [F]
+RewriteCond "%{HTTP_USER_AGENT}"   "^NameOfBadRobot"
+RewriteCond "%{REMOTE_ADDR}"       "=123\.45\.67\.[8-9]"
+RewriteRule "^/secret/files/"   "-"   [F]
 </highlight>
         </dd>
 
@@ -183,8 +183,8 @@ RewriteRule ^/secret/files/   -   [F]
         same end using alternate means, as illustrated here:
       </p>
       <highlight language="config">
-SetEnvIfNoCase User-Agent ^NameOfBadRobot goaway
-&lt;Location /secret/files&gt;
+SetEnvIfNoCase User-Agent "^NameOfBadRobot" goaway
+&lt;Location "/secret/files"&gt;
     &lt;RequireAll&gt;
         Require all granted
         Require not env goaway
@@ -222,10 +222,10 @@ SetEnvIfNoCase User-Agent ^NameOfBadRobot goaway
     <dd>
 <highlight language="config">
 RewriteEngine on
-RewriteMap    hosts-deny  txt:/path/to/hosts.deny
-RewriteCond   ${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND} !=NOT-FOUND [OR]
-RewriteCond   ${hosts-deny:%{REMOTE_HOST}|NOT-FOUND} !=NOT-FOUND
-RewriteRule   ^  -  [F]
+RewriteMap    hosts-deny  "txt:/path/to/hosts.deny"
+RewriteCond   "${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND}" "!=NOT-FOUND" [OR]
+RewriteCond   "${hosts-deny:%{REMOTE_HOST}|NOT-FOUND}" "!=NOT-FOUND"
+RewriteRule   "^"  "-"  [F]
 </highlight>
 
 <example>
@@ -275,15 +275,15 @@ bsdti1.sdm.de  -<br />
   with a redirection target.</p>
 
 <highlight language="config">
-RewriteMap  deflector txt:/path/to/deflector.map
+RewriteMap  deflector "txt:/path/to/deflector.map"
 
-RewriteCond %{HTTP_REFERER} !=""
-RewriteCond ${deflector:%{HTTP_REFERER}} =-
-RewriteRule ^ %{HTTP_REFERER} [R,L]
+RewriteCond "%{HTTP_REFERER}" !=""
+RewriteCond "${deflector:%{HTTP_REFERER}}" "=-"
+RewriteRule "^" "%{HTTP_REFERER}" [R,L]
 
-RewriteCond %{HTTP_REFERER} !=""
-RewriteCond ${deflector:%{HTTP_REFERER}|NOT-FOUND} !=NOT-FOUND
-RewriteRule ^ ${deflector:%{HTTP_REFERER}} [R,L]
+RewriteCond "%{HTTP_REFERER}" !=""
+RewriteCond "${deflector:%{HTTP_REFERER}|NOT-FOUND}" "!=NOT-FOUND"
+RewriteRule "^" "${deflector:%{HTTP_REFERER}}" [R,L]
 </highlight>
 
       <p>The map file lists redirection targets for each referer, or, if
index f94421589c520f630649f08e60c400f0e37fc139..382a9a18ad3b02401609ba0f5d7a4256cc142641 100644 (file)
@@ -94,8 +94,8 @@ http://physical_host_of_user1/u/user/anypath
 
 <highlight language="config">
 RewriteEngine on
-RewriteMap      users-to-hosts   txt:/path/to/map.users-to-hosts
-RewriteRule   ^/u/([^/]+)/?(.*)   http://${users-to-hosts:$1|server0}/u/$1/$2
+RewriteMap      users-to-hosts   "txt:/path/to/map.users-to-hosts"
+RewriteRule   "^/u/([^/]+)/?(.*)"   "http://${users-to-hosts:$1|server0}/u/$1/$2"
 </highlight>
     </dd>
   </dl>
@@ -127,8 +127,8 @@ RewriteRule   ^/u/([^/]+)/?(.*)   http://${users-to-hosts:$1|server0}/u/$1/$2
 
 <highlight language="config">
 # This example is valid in per-directory context only
-RewriteCond %{REQUEST_URI}   !-U
-RewriteRule ^(.+)\.html$          /regenerate_page.cgi   [PT,L]
+RewriteCond "%{REQUEST_URI}"   "!-U"
+RewriteRule "^(.+)\.html$"          "/regenerate_page.cgi"   [PT,L]
 </highlight>
 
     <p>The <code>-U</code> operator determines whether the test string
@@ -169,8 +169,8 @@ RewriteRule ^(.+)\.html$          /regenerate_page.cgi   [PT,L]
 
 <highlight language="config">
 RewriteEngine on
-RewriteMap lb rnd:/path/to/serverlist.txt
-RewriteRule ^/(.*) http://${lb:servers}/$1 [P,L]
+RewriteMap lb "rnd:/path/to/serverlist.txt"
+RewriteRule "^/(.*)" "http://${lb:servers}/$1" [P,L]
 </highlight>
 
 <p><code>serverlist.txt</code> will contain a list of the servers:</p>
@@ -221,7 +221,7 @@ featureful than anything you can cobble together using mod_rewrite.</p>
 
 <highlight language="config">
 RewriteEngine on
-RewriteRule   ^/~(<strong>([a-z])</strong>[a-z0-9]+)(.*)  /home/<strong>$2</strong>/$1/public_html$3
+RewriteRule   "^/~(<strong>([a-z])</strong>[a-z0-9]+)(.*)"  "/home/<strong>$2</strong>/$1/public_html$3"
 </highlight>
     </dd>
   </dl>
@@ -280,10 +280,10 @@ RewriteRule   ^/~(<strong>([a-z])</strong>[a-z0-9]+)(.*)  /home/<strong>$2</stro
 
 <highlight language="config">
 RewriteEngine on
-RewriteCond   %{TIME_HOUR}%{TIME_MIN} &gt;0700
-RewriteCond   %{TIME_HOUR}%{TIME_MIN} &lt;1900
-RewriteRule   ^foo\.html$             foo.day.html [L]
-RewriteRule   ^foo\.html$             foo.night.html
+RewriteCond   "%{TIME_HOUR}%{TIME_MIN}" "&gt;0700"
+RewriteCond   "%{TIME_HOUR}%{TIME_MIN}" "&lt;1900"
+RewriteRule   "^foo\.html$"             "foo.day.html" [L]
+RewriteRule   "^foo\.html$"             "foo.night.html"
 </highlight>
 
       <p>This provides the content of <code>foo.day.html</code>
@@ -325,14 +325,14 @@ RewriteRule   ^foo\.html$             foo.night.html
 
 <highlight language="config">
 RewriteEngine on
-RewriteRule   ^/horse/(.*)   /pony/$1 [E=<strong>rewritten:1</strong>]
+RewriteRule   "^/horse/(.*)"   "/pony/$1" [E=<strong>rewritten:1</strong>]
 </highlight>
 
     <p>Later in your ruleset you might check for this environment
     variable using a RewriteCond:</p>
 
 <highlight language="config">
-RewriteCond %{ENV:rewritten} =1
+RewriteCond "%{ENV:rewritten}" "=1"
 </highlight>
 
     <p>Note that environment variables do not survive an external
index d71eb1384956e6e2ab863da4bc01f3b808f3f720..3a1813410dfc98b08d3c2216aaafb93a46c32872 100644 (file)
@@ -98,7 +98,7 @@ following:</p>
 <highlight language="config">
 &lt;VirtualHost *:80&gt;
     ServerName www.example.com
-    Redirect / https://www.example.com/
+    Redirect "/" "https://www.example.com/"
 &lt;/VirtualHost &gt;
 
 &lt;VirtualHost *:443&gt;
@@ -130,7 +130,7 @@ is possible to perform this mapping with <code>mod_rewrite</code>,
 and performance.</p>
 
 <example><title>Using Alias</title>
-<highlight language="config">Alias /cats /var/www/virtualhosts/felines/htdocs</highlight>
+<highlight language="config">Alias "/cats" "/var/www/virtualhosts/felines/htdocs"</highlight>
 </example>
 
 <p>
@@ -173,7 +173,7 @@ href="flags.html#flag_p">[P]</a> flag to pass rewritten URIs through
 <module>mod_proxy</module>.</p>
 
 <highlight language="config">
-RewriteRule ^/?images(.*) http://imageserver.local/images$1 [P]
+RewriteRule "^/?images(.*)" "http://imageserver.local/images$1" [P]
 </highlight>
 
 <p>However, in many cases, when there is no actual pattern matching
@@ -182,7 +182,7 @@ module="mod_proxy">ProxyPass</directive> directive is a better choice.
 The example here could be rendered as:</p>
 
 <highlight language="config">
-ProxyPass /images/ http://imageserver.local/images/
+ProxyPass "/images/" "http://imageserver.local/images/"
 </highlight>
 
 <p>Note that whether you use <directive
@@ -192,7 +192,7 @@ module="mod_proxy">ProxyPass</directive>, you'll still need to use the
 catch redirects issued from the back-end server:</p>
 
 <highlight language="config">
-ProxyPassReverse /images/ http://imageserver.local/images/
+ProxyPassReverse "/images/" "http://imageserver.local/images/"
 </highlight>
 
 <p>You may need to use <code>RewriteRule</code> instead when there are
@@ -218,7 +218,7 @@ module="core" type="section">If</directive> directive, as shown here:</p>
 
 <highlight language="config">
 &lt;If "req('Host') != 'www.example.com'"&gt;
-    Redirect / http://www.example.com/
+    Redirect "/" "http://www.example.com/"
 &lt;/If&gt;
 </highlight>
 
index ef746841f941c20902800ce1e27ab984bd91e6a3..8ecbd5f344196559ba33641dc55375dbb8a32b0f 100644 (file)
@@ -46,7 +46,9 @@ providing detailed explanations and examples.</p>
 its behavior modified by one or more flags. Flags are included in
 square brackets at the end of the rule, and multiple flags are separated
 by commas.</p>
-<highlight language="config">RewriteRule pattern target [Flag1,Flag2,Flag3]</highlight>
+<highlight language="config">
+RewriteRule pattern target [Flag1,Flag2,Flag3]
+</highlight>
 
 <p>Each flag (with a few exceptions) has a short form, such as
 <code>CO</code>, as well as a longer form, such as <code>cookie</code>. 
@@ -75,7 +77,9 @@ so backreferences are unescaped at the time they are applied.
 Using the B flag, non-alphanumeric characters in backreferences
 will be escaped. For example, consider the rule:</p>
 
-<highlight language="config">RewriteRule ^search/(.*)$ /search.php?term=$1</highlight>
+<highlight language="config">
+RewriteRule "^search/(.*)$" "/search.php?term=$1"
+</highlight>
 
 <p>Given a search term of 'x &amp; y/z', a browser will encode it as
 'x%20%26%20y%2Fz', making the request 'search/x%20%26%20y%2Fz'. Without the B
@@ -163,7 +167,7 @@ browsers that support this feature.</dd>
 
 <highlight language="config">
 RewriteEngine On
-RewriteRule ^/index\.html - [CO=frontdoor:yes:.example.com:1440:/]
+RewriteRule "^/index\.html" "-" [CO=frontdoor:yes:.example.com:1440:/]
 </highlight>
 
 <p>In the example give, the rule doesn't rewrite the request.
@@ -250,8 +254,8 @@ environment variable is used to exclude those requests from the access
 log.</p>
 
 <highlight language="config">
-RewriteRule \.(png|gif|jpg)$ - [E=image:1]
-CustomLog logs/access_log combined env=!image
+RewriteRule "\.(png|gif|jpg)$" "-" [E=image:1]
+CustomLog "logs/access_log" combined env=!image
 </highlight>
 
 <p>Note that this same effect can be obtained using <directive
@@ -277,7 +281,9 @@ allows more flexibility in assigning a Forbidden status.</p>
 <p>The following rule will forbid <code>.exe</code> files from being
 downloaded from your server.</p>
 
-<highlight language="config">RewriteRule \.exe - [F]</highlight>
+<highlight language="config">
+RewriteRule "\.exe" "-" [F]
+</highlight>
 
 <p>This example uses the "-" syntax for the rewrite target, which means
 that the requested URI is not modified. There's no reason to rewrite to
@@ -296,7 +302,9 @@ longer available.</p>
 <p>As with the [F] flag, you will typically use the "-" syntax for the
 rewrite target when using the [G] flag:</p>
 
-<highlight language="config">RewriteRule oldproduct - [G,NC]</highlight>
+<highlight language="config">
+RewriteRule "oldproduct" "-" [G,NC]
+</highlight>
 
 <p>When using [G], an [L] is implied - that is, the response is returned
 immediately, and no further rules are evaluated.</p>
@@ -308,7 +316,9 @@ immediately, and no further rules are evaluated.</p>
 handler. For example, one might use this to force all files without a
 file extension to be parsed by the php handler:</p>
 
-<highlight language="config">RewriteRule !\. - [H=application/x-httpd-php]</highlight>
+<highlight language="config">
+RewriteRule "!\." "-" [H=application/x-httpd-php]
+</highlight>
 
 <p>
 The regular expression above - <code>!\.</code> - will match any request
@@ -321,7 +331,7 @@ For example, the following snippet used in per-server context allows
 if they are requested with the <code>.phps</code> extension:</p>
 
 <highlight language="config">
-RewriteRule ^(/source/.+\.php)s$ $1 [H=application/x-httpd-php-source]
+RewriteRule "^(/source/.+\.php)s$" "$1" [H=application/x-httpd-php-source]
 </highlight>
 
 <p>The regular expression above - <code>^(/source/.+\.php)s$</code> - will
@@ -374,9 +384,9 @@ is already for <code>index.php</code>, the <directive
 module="mod_rewrite">RewriteRule</directive> will be skipped.</p>
 
 <highlight language="config">
-RewriteBase /
-RewriteCond %{REQUEST_URI} !=/index.php
-RewriteRule ^(.*) /index.php?req=$1 [L,PT]
+RewriteBase "/"
+RewriteCond "%{REQUEST_URI}" "!=/index.php"
+RewriteRule "^(.*)" "/index.php?req=$1" [L,PT]
 </highlight>
 </section>
 
@@ -392,7 +402,9 @@ certain string or letter repeatedly in a request. The example shown here
 will replace A with B everywhere in a request, and will continue doing
 so until there are no more As to be replaced.
 </p>
-<highlight language="config">RewriteRule (.*)A(.*) $1B$2 [N]</highlight>
+<highlight language="config">
+RewriteRule "(.*)A(.*)" "$1B$2" [N]
+</highlight>
 <p>You can think of this as a <code>while</code> loop: While this
 pattern still matches (i.e., while the URI still contains an
 <code>A</code>), perform this substitution (i.e., replace the
@@ -403,9 +415,9 @@ protect against unintended looping.  An alternative maximum number of
 iterations can be specified by adding to the N flag.  </p>
 <highlight language="config">
 # Be willing to replace 1 character in each pass of the loop
-RewriteRule (.+)[&gt;&lt;;]$ $1 [N=64000]
+RewriteRule "(.+)[&gt;&lt;;]$" "$1" [N=64000]
 # ... or, give up if after 10 loops
-RewriteRule (.+)[&gt;&lt;;]$ $1 [N=10]
+RewriteRule "(.+)[&gt;&lt;;]$" "$1" [N=10]
 </highlight>
 
 </section>
@@ -421,7 +433,9 @@ to your dedicated image server. The match is case-insensitive, so that
 <code>.jpg</code> and <code>.JPG</code> files are both acceptable, for
 example.</p>
 
-<highlight language="config">RewriteRule (.*\.(jpg|gif|png))$ http://images.example.com$1 [P,NC]</highlight>
+<highlight language="config">
+RewriteRule "(.*\.(jpg|gif|png))$" "http://images.example.com$1" [P,NC]
+</highlight>
 </section>
 
 <section id="flag_ne"><title>NE|noescape</title>
@@ -430,7 +444,9 @@ example.</p>
 equivalent. Using the [NE] flag prevents that from happening.
 </p>
 
-<highlight language="config">RewriteRule ^/anchor/(.+) /bigpage.html#$1 [NE,R]</highlight>
+<highlight language="config">
+RewriteRule "^/anchor/(.+)" "/bigpage.html#$1" [NE,R]
+</highlight>
 
 <p>
 The above example will redirect <code>/anchor/xyz</code> to
@@ -471,7 +487,9 @@ requests.
 example, if you wanted all image requests to be handled by a back-end
 image server, you might do something like the following:</p>
 
-<highlight language="config">RewriteRule /(.*)\.(jpg|gif|png)$ http://images.example.com/$1.$2 [P]</highlight>
+<highlight language="config">
+RewriteRule "/(.*)\.(jpg|gif|png)$" "http://images.example.com/$1.$2" [P]
+</highlight>
 
 <p>Use of the [P] flag implies [L] - that is, the request is immediately
 pushed through the proxy, and any following rules will not be
@@ -534,8 +552,8 @@ use the [PT] flag to ensure that the
 </p>
 
 <highlight language="config">
-Alias /icons /usr/local/apache/icons
-RewriteRule /pics/(.+)\.jpg$ /icons/$1.gif [PT]
+Alias "/icons" "/usr/local/apache/icons"
+RewriteRule "/pics/(.+)\.jpg$" "/icons/$1.gif" [PT]
 </highlight>
 
 <p>
@@ -565,7 +583,9 @@ Using the [QSA] flag causes the query strings to be combined.
 
 <p>Consider the following rule:</p>
 
-<highlight language="config">RewriteRule /pages/(.+) /page.php?page=$1 [QSA]</highlight>
+<highlight language="config">
+RewriteRule "/pages/(.+)" "/page.php?page=$1" [QSA]
+</highlight>
 
 <p>With the [QSA] flag, a request for <code>/pages/123?one=two</code> will be
 mapped to <code>/page.php?page=123&amp;one=two</code>. Without the [QSA]
@@ -642,13 +662,13 @@ requested URI doesn't correspond with an actual file.</p>
 
 <highlight language="config">
 # Is the request for a non-existent file?
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteCond %{REQUEST_FILENAME} !-d
+RewriteCond "%{REQUEST_FILENAME}" "!-f"
+RewriteCond "%{REQUEST_FILENAME}" "!-d"
 # If so, skip these two RewriteRules
-RewriteRule .? - [S=2]
+RewriteRule ".?" "-" [S=2]
 
-RewriteRule (.*\.gif) images.php?$1
-RewriteRule (.*\.html) docs.php?$1
+RewriteRule "(.*\.gif)" "images.php?$1"
+RewriteRule "(.*\.html)" "docs.php?$1"
 </highlight>
 
 <p>This technique is useful because a <directive
@@ -662,18 +682,18 @@ the then-clause becomes <code>skip=N</code>, where N is the
 number of rules in the else-clause:</p>
 <highlight language="config">
 # Does the file exist?
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteCond %{REQUEST_FILENAME} !-d
+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 &quot;else&quot; stanza.
-RewriteRule .? - [S=3]
+RewriteRule ".?" "-" [S=3]
 
 # IF the file exists, then:
-    RewriteRule (.*\.gif) images.php?$1
-    RewriteRule (.*\.html) docs.php?$1
+    RewriteRule "(.*\.gif)" "images.php?$1"
+    RewriteRule "(.*\.html)" "docs.php?$1"
     # Skip past the &quot;else&quot; stanza.
-    RewriteRule .? - [S=1]
+    RewriteRule ".?" "-" [S=1]
 # ELSE...
-    RewriteRule (.*) 404.php?file=$1
+    RewriteRule "(.*)" "404.php?file=$1"
 # END
 </highlight>
 
@@ -694,7 +714,7 @@ source code as plain text, if requested in a particular way:</p>
 
 <highlight language="config">
 # Serve .pl files as plain text
-RewriteRule \.pl$ - [T=text/plain]
+RewriteRule "\.pl$" "-" [T=text/plain]
 </highlight>
 
 <p>Or, perhaps, if you have a camera that produces jpeg images without
@@ -703,7 +723,7 @@ correct MIME type by virtue of their file names:</p>
 
 <highlight language="config">
 # Files with 'IMG' in the name are jpg images.
-RewriteRule IMG - [T=image/jpg]
+RewriteRule "IMG" "-" [T=image/jpg]
 </highlight>
 
 <p>Please note that this is a trivial example, and could be better done
index 798bd00e93dfdc02aade715ac4403388bf4295f2..871e56e5da0ad9aedfd2aaf3050ac17bfe47bc62 100644 (file)
@@ -206,7 +206,7 @@ value.
 <dt>A full filesystem path to a resource</dt>
 <dd>
 <highlight language="config">
-RewriteRule ^/games /usr/local/games/web
+RewriteRule "^/games" "/usr/local/games/web"
 </highlight>
 <p>This maps a request to an arbitrary location on your filesystem, much
 like the <directive module="mod_alias">Alias</directive> directive.</p>
@@ -215,7 +215,7 @@ like the <directive module="mod_alias">Alias</directive> directive.</p>
 <dt>A web-path to a resource</dt>
 <dd>
 <highlight language="config">
-RewriteRule ^/foo$ /bar
+RewriteRule "^/foo$" "/bar"
 </highlight>
 <p>If <directive module="core">DocumentRoot</directive> is set
 to <code>/usr/local/apache2/htdocs</code>, then this directive would
@@ -226,7 +226,7 @@ path <code>/usr/local/apache2/htdocs/bar</code>.</p>
 <dt>An absolute URL</dt>
 <dd>
 <highlight language="config">
-RewriteRule ^/product/view$ http://site2.example.com/seeproduct.html [R]
+RewriteRule "^/product/view$" "http://site2.example.com/seeproduct.html" [R]
 </highlight>
 <p>This tells the client to make a new request for the specified URL.</p>
 </dd>
@@ -236,7 +236,7 @@ RewriteRule ^/product/view$ http://site2.example.com/seeproduct.html [R]
 contain <em>back-references</em> to parts of the incoming URL-path
 matched by the <var>Pattern</var>. Consider the following:</p>
 <highlight language="config">
-RewriteRule ^/product/(.*)/view$ /var/web/productdb/$1
+RewriteRule "^/product/(.*)/view$" "/var/web/productdb/$1"
 </highlight>
 <p>The variable <code>$1</code> will be replaced with whatever text
 was matched by the expression inside the parenthesis in
@@ -260,7 +260,7 @@ matching behavior of a rule can be made case-insensitive by the
 application of the <code>[NC]</code> flag:
 </p>
 <highlight language="config">
-RewriteRule ^puppy.html smalldog.html [NC]
+RewriteRule "^puppy.html" "smalldog.html" [NC]
 </highlight>
 
 <p>For more details on the available flags, their meanings, and
@@ -288,8 +288,8 @@ argument is a list of flags that modify how the match is evaluated.</p>
 <p>For example, to send all requests from a particular IP range to a
 different server, you could use:</p>
 <highlight language="config">
-RewriteCond %{REMOTE_ADDR} ^10\.2\.
-RewriteRule (.*) http://intranet.example.com$1
+RewriteCond "%{REMOTE_ADDR}" "^10\.2\."
+RewriteRule "(.*)" "http://intranet.example.com$1"
 </highlight>
 
 <p>When more than
@@ -300,9 +300,9 @@ applied. For example, to deny requests that contain the word "hack" in
 their query string, unless they also contain a cookie containing
 the word "go", you could use:</p>
 <highlight language="config">
-RewriteCond %{QUERY_STRING} hack
-RewriteCond %{HTTP_COOKIE} !go
-RewriteRule . - [F]
+RewriteCond "%{QUERY_STRING}" "hack"
+RewriteCond "%{HTTP_COOKIE}" "!go"
+RewriteRule "." "-" [F]
 </highlight>
 <p>Notice that the exclamation mark specifies a negative match, so the rule is only applied if the cookie does not contain "go".</p>
 
@@ -314,8 +314,8 @@ variables <code>%1</code>, <code>%2</code>, etc. For example, this
 will direct the request to a different directory depending on the
 hostname used to access the site:</p>
 <highlight language="config">
-RewriteCond %{HTTP_HOST} (.*)
-RewriteRule ^/(.*) /sites/%1/$1
+RewriteCond "%{HTTP_HOST}" "(.*)"
+RewriteRule "^/(.*)" "/sites/%1/$1"
 </highlight>
 <p>If the request was for <code>http://example.com/foo/bar</code>,
 then <code>%1</code> would contain <code>example.com</code>
index 0a881f256ca864c8b90a3b35d6a325ddb9ef3227..72e0af968575e25fd51d5f1f2ba0bd4c38c3ec23 100644 (file)
@@ -67,9 +67,9 @@ A number of recipes are provided that describe common scenarios.</p>
 
 <highlight language="config">
 RewriteEngine  on
-RewriteBase    /products/
-RewriteRule    ^widget/(.*)$  http://product.example.com/widget/$1  [P]
-ProxyPassReverse /products/widget/ http://product.example.com/widget/
+RewriteBase    "/products/"
+RewriteRule    "^widget/(.*)$"  "http://product.example.com/widget/$1"  [P]
+ProxyPassReverse "/products/widget/" "http://product.example.com/widget/"
 </highlight>
 
    <p>In the second example, we proxy the request only if we can't find
@@ -78,10 +78,10 @@ ProxyPassReverse /products/widget/ http://product.example.com/widget/
    has been migrated yet.</p>
 
 <highlight language="config">
-RewriteCond %{REQUEST_FILENAME}       !-f
-RewriteCond %{REQUEST_FILENAME}       !-d
-RewriteRule ^/(.*) http://old.example.com/$1 [P]
-ProxyPassReverse / http://old.example.com/
+RewriteCond "%{REQUEST_FILENAME}"       !-f
+RewriteCond "%{REQUEST_FILENAME}"       !-d
+RewriteRule "^/(.*)" "http://old.example.com/$1" [P]
+ProxyPassReverse "/" "http://old.example.com/"
 </highlight>
     </dd>
 
index 9ff7b29f7a277b9a0072d0d779b5f7126ad501de..a5f9a574ff5667d9d075e8d9098e849e743e661e 100644 (file)
@@ -73,7 +73,7 @@ configuration.</note>
 
 <highlight language="config">
 RewriteEngine  on
-RewriteRule    ^<strong>/foo</strong>\.html$  <strong>/bar</strong>.html [PT]
+RewriteRule    "^<strong>/foo</strong>\.html$"  "<strong>/bar</strong>.html" [PT]
 </highlight>
     </dd>
   </dl>
@@ -104,7 +104,7 @@ RewriteRule    ^<strong>/foo</strong>\.html$  <strong>/bar</strong>.html [PT]
 
 <highlight language="config">
 RewriteEngine  on
-RewriteRule    ^<strong>/foo</strong>\.html$  <strong>bar</strong>.html  [<strong>R</strong>]
+RewriteRule    "^<strong>/foo</strong>\.html$"  "<strong>bar</strong>.html"  [<strong>R</strong>]
 </highlight>
 </dd>
 
@@ -116,7 +116,9 @@ RewriteRule    ^<strong>/foo</strong>\.html$  <strong>bar</strong>.html  [<stron
     use the Redirect directive. mod_rewrite was used in that earlier
     example in order to hide the redirect from the client:</p>
 
-    <highlight language="config">Redirect /foo.html /bar.html</highlight>
+    <highlight language="config">
+Redirect "/foo.html" "/bar.html"
+    </highlight>
 
     </dd>
   </dl>
@@ -143,17 +145,20 @@ RewriteRule    ^<strong>/foo</strong>\.html$  <strong>bar</strong>.html  [<stron
       to the new server, but you might also consider using the Redirect
       or RedirectMatch directive.</p>
 
-<highlight language="config">#With mod_rewrite
+<highlight language="config">
+#With mod_rewrite
 RewriteEngine on
-RewriteRule   ^/docs/(.+)  http://new.example.com/docs/$1  [R,L]
+RewriteRule   "^/docs/(.+)"  "http://new.example.com/docs/$1"  [R,L]
 </highlight>
 
-<highlight language="config">#With RedirectMatch
-RedirectMatch ^/docs/(.*) http://new.example.com/docs/$1
+<highlight language="config">
+#With RedirectMatch
+RedirectMatch "^/docs/(.*)" "http://new.example.com/docs/$1"
 </highlight>
 
-<highlight language="config">#With Redirect
-Redirect /docs/ http://new.example.com/docs/
+<highlight language="config">
+#With Redirect
+Redirect "/docs/" "http://new.example.com/docs/"
 </highlight>
     </dd>
   </dl>
@@ -186,8 +191,8 @@ Redirect /docs/ http://new.example.com/docs/
 
 <highlight language="config">
 RewriteEngine  on
-RewriteBase    /~quux/
-RewriteRule    ^foo\.html$  foo.cgi &nbsp; [H=<strong>cgi-script</strong>]
+RewriteBase    "/~quux/"
+RewriteRule    "^foo\.html$"  "foo.cgi" &nbsp; [H=<strong>cgi-script</strong>]
 </highlight>
     </dd>
   </dl>
@@ -219,13 +224,13 @@ RewriteRule    ^foo\.html$  foo.cgi &nbsp; [H=<strong>cgi-script</strong>]
 #   backward compatibility ruleset for
 #   rewriting document.html to document.php
 #   when and only when document.php exists
-&lt;Directory /var/www/htdocs&gt;
+&lt;Directory "/var/www/htdocs"&gt;
     RewriteEngine on
-    RewriteBase /var/www/htdocs
+    RewriteBase "/var/www/htdocs"
 
-    RewriteCond $1.php -f
-    RewriteCond $1.html !-f
-    RewriteRule ^(.*).html$ $1.php
+    RewriteCond "$1.php" -f
+    RewriteCond "$1.html" !-f
+    RewriteRule "^(.*).html$" "$1.php"
 &lt;/Directory&gt;
 </highlight>
     </dd>
@@ -280,7 +285,7 @@ hostname(s).</p>
   ServerName undesired.example.com
   ServerAlias example.com notthis.example.com
 
-  Redirect / http://www.example.com/
+  Redirect "/" "http://www.example.com/"
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost *:80&gt;
@@ -294,7 +299,7 @@ directive:</p>
 
 <highlight language="config">
 &lt;If "%{HTTP_HOST} != 'www.example.com'"&gt;
-       Redirect / http://www.example.com/
+       Redirect "/" "http://www.example.com/"
 &lt;/If&gt;
 </highlight>
 
@@ -303,7 +308,7 @@ might do the following:</p>
 
 <highlight language="config">
 &lt;If "%{SERVER_PROTOCOL} != 'HTTPS'"&gt;
-       Redirect /admin/ https://www.example.com/admin/
+       Redirect "/admin/" "https://www.example.com/admin/"
 &lt;/If&gt;
 </highlight>
 
@@ -313,17 +318,17 @@ you might use one of the recipes below.</p>
 
 <p>For sites running on a port other than 80:</p>
 <highlight language="config">
-RewriteCond %{HTTP_HOST}   !^www\.example\.com [NC]
-RewriteCond %{HTTP_HOST}   !^$
-RewriteCond %{SERVER_PORT} !^80$
-RewriteRule ^/?(.*)         http://www.example.com:%{SERVER_PORT}/$1 [L,R,NE]
+RewriteCond "%{HTTP_HOST}"   "!^www\.example\.com" [NC]
+RewriteCond "%{HTTP_HOST}"   "!^$"
+RewriteCond "%{SERVER_PORT}" "!^80$"
+RewriteRule "^/?(.*)         "http://www.example.com:%{SERVER_PORT}/$1" [L,R,NE]
 </highlight>
 
 <p>And for a site running on port 80</p>
 <highlight language="config">
-RewriteCond %{HTTP_HOST}   !^www\.example\.com [NC]
-RewriteCond %{HTTP_HOST}   !^$
-RewriteRule ^/?(.*)         http://www.example.com/$1 [L,R,NE]
+RewriteCond "%{HTTP_HOST}"   "!^www\.example\.com" [NC]
+RewriteCond "%{HTTP_HOST}"   "!^$"
+RewriteRule "^/?(.*)"        "http://www.example.com/$1" [L,R,NE]
 </highlight>
 
         <p>
@@ -334,9 +339,9 @@ RewriteRule ^/?(.*)         http://www.example.com/$1 [L,R,NE]
         recipe:</p>
 
 <highlight language="config">
-RewriteCond %{HTTP_HOST} !^www\. [NC]
-RewriteCond %{HTTP_HOST} !^$
-RewriteRule ^/?(.*) http://www.%{HTTP_HOST}/$1 [L,R,NE]
+RewriteCond "%{HTTP_HOST}" "!^www\." [NC]
+RewriteCond "%{HTTP_HOST}" "!^$"
+RewriteRule "^/?(.*)"      "http://www.%{HTTP_HOST}/$1" [L,R,NE]
 </highlight>
 
     <p>These rulesets will work either in your main server configuration
@@ -373,17 +378,17 @@ RewriteEngine on
 
 #   first try to find it in dir1/...
 #   ...and if found stop and be happy:
-RewriteCond         %{DOCUMENT_ROOT}/<strong>dir1</strong>/%{REQUEST_URI}  -f
-RewriteRule  ^(.+)  %{DOCUMENT_ROOT}/<strong>dir1</strong>/$1  [L]
+RewriteCond         "%{DOCUMENT_ROOT}/<strong>dir1</strong>/%{REQUEST_URI}"  -f
+RewriteRule "^(.+)" "%{DOCUMENT_ROOT}/<strong>dir1</strong>/$1"  [L]
 
 #   second try to find it in dir2/...
 #   ...and if found stop and be happy:
-RewriteCond         %{DOCUMENT_ROOT}/<strong>dir2</strong>/%{REQUEST_URI}  -f
-RewriteRule  ^(.+)  %{DOCUMENT_ROOT}/<strong>dir2</strong>/$1  [L]
+RewriteCond         "%{DOCUMENT_ROOT}/<strong>dir2</strong>/%{REQUEST_URI}"  -f
+RewriteRule "^(.+)" "%{DOCUMENT_ROOT}/<strong>dir2</strong>/$1"  [L]
 
 #   else go on for other Alias or ScriptAlias directives,
 #   etc.
-RewriteRule   ^  -  [PT]
+RewriteRule   "^"  "-"  [PT]
 </highlight>
     </dd>
   </dl>
@@ -415,9 +420,9 @@ RewriteRule   ^  -  [PT]
 <highlight language="config">
 HostnameLookups on
 RewriteEngine on
-RewriteMap    multiplex         txt:/path/to/map.mirrors
-RewriteCond  %{REMOTE_HOST}     ([a-z]+)$ [NC]
-RewriteRule   ^/(.*)$  ${multiplex:<strong>%1</strong>|http://www.example.com/}$1  [R,L]
+RewriteMap    multiplex         "txt:/path/to/map.mirrors"
+RewriteCond   "%{REMOTE_HOST}"  "([a-z]+)$" [NC]
+RewriteRule   "^/(.*)$"  "${multiplex:<strong>%1</strong>|http://www.example.com/}$1"  [R,L]
 </highlight>
 
 <example>
@@ -473,14 +478,14 @@ com       http://www.example.com/<br />
       This is done with the following ruleset:</p>
 
 <highlight language="config">
-RewriteCond %{HTTP_USER_AGENT}  ^<strong>Mozilla/3</strong>.*
-RewriteRule ^foo\.html$         foo.<strong>NS</strong>.html          [<strong>L</strong>]
+RewriteCond "%{HTTP_USER_AGENT}"  "^<strong>Mozilla/3</strong>.*"
+RewriteRule "^foo\.html$"         "foo.<strong>NS</strong>.html"          [<strong>L</strong>]
 
-RewriteCond %{HTTP_USER_AGENT}  ^Lynx/ [OR]
-RewriteCond %{HTTP_USER_AGENT}  ^Mozilla/[12]
-RewriteRule ^foo\.html$         foo.<strong>20</strong>.html          [<strong>L</strong>]
+RewriteCond "%{HTTP_USER_AGENT}"  "^Lynx/" [OR]
+RewriteCond "%{HTTP_USER_AGENT}"  "^Mozilla/[12]"
+RewriteRule "^foo\.html$"         "foo.<strong>20</strong>.html"          [<strong>L</strong>]
 
-RewriteRule ^foo\.html$         foo.<strong>32</strong>.html          [<strong>L</strong>]
+RewriteRule "^foo\.html$"         "foo.<strong>32</strong>.html"          [<strong>L</strong>]
 </highlight>
     </dd>
   </dl>
@@ -512,7 +517,9 @@ RewriteRule ^foo\.html$         foo.<strong>32</strong>.html          [<strong>L
        we replace <code>/puppies</code> and <code>/canines</code>
        by the canonical <code>/dogs</code>.</p>
 
-<highlight language="config">RewriteRule   ^/(puppies|canines)/(.*)    /dogs/$2  [R]</highlight>
+<highlight language="config">
+RewriteRule   "^/(puppies|canines)/(.*)"    "/dogs/$2"  [R]
+</highlight>
         </dd>
 
      <dt>Discussion:</dt>
@@ -520,7 +527,9 @@ RewriteRule ^foo\.html$         foo.<strong>32</strong>.html          [<strong>L
      This should really be accomplished with Redirect or RedirectMatch
      directives:
 
-     <highlight language="config"> RedirectMatch ^/(puppies|canines)/(.*) /dogs/$2 </highlight>
+     <highlight language="config">
+RedirectMatch "^/(puppies|canines)/(.*)" "/dogs/$2"
+</highlight>
      </dd>
       </dl>
 
@@ -551,13 +560,15 @@ using the following ruleset:</p>
 
 <highlight language="config">
 RewriteEngine on
-RewriteRule   ^/$  /about/  [<strong>R</strong>]
+RewriteRule   "^/$"  "/about/"  [<strong>R</strong>]
 </highlight>
 
 <p>Note that this can also be handled using the <directive
 module="mod_alias">RedirectMatch</directive> directive:</p>
 
-<highlight language="config">RedirectMatch ^/$ http://example.com/about/</highlight>
+<highlight language="config">
+RedirectMatch "^/$" "http://example.com/about/"
+</highlight>
 
 <p>Note also that the example rewrites only the root URL. That is, it
 rewrites a request for <code>http://example.com/</code>, but not a
@@ -587,8 +598,8 @@ that should go to an existing resource such as an image, or a css file.</dd>
 module="mod_dir">FallbackResource</directive> directive for this:</p>
 
 <highlight language="config">
-&lt;Directory /var/www/my_blog&gt;
-  FallbackResource index.php
+&lt;Directory "/var/www/my_blog"&gt;
+  FallbackResource "index.php"
 &lt;/Directory&gt;
 </highlight>
 
@@ -597,19 +608,21 @@ complicated than this, you can use a variation of the following rewrite
 set to accomplish the same thing:</p>
 
 <highlight language="config">
-&lt;Directory /var/www/my_blog&gt;
-  RewriteBase /my_blog
+&lt;Directory "/var/www/my_blog"&gt;
+  RewriteBase "/my_blog"
 
-  RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-f
-  RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-d
-  RewriteRule ^ index.php [PT]
+  RewriteCond "/var/www/my_blog/%{REQUEST_FILENAME}" !-f
+  RewriteCond "/var/www/my_blog/%{REQUEST_FILENAME}" !-d
+  RewriteRule "^" "index.php" [PT]
 &lt;/Directory&gt;
 </highlight>
 
 <p>If, on the other hand, you wish to pass the requested URI as a query
 string argument to index.php, you can replace that RewriteRule with:</p>
 
-<highlight language="config">RewriteRule (.*) index.php?$1 [PT,QSA]</highlight>
+<highlight language="config">
+RewriteRule "(.*)" "index.php?$1" [PT,QSA]
+</highlight>
 
 <p>Note that these rulesets can be used in a <code>.htaccess</code>
 file, as well as in a &lt;Directory&gt; block.</p>
@@ -641,8 +654,8 @@ substitutions.</p>
 
 <highlight language="config">
 # Remove mykey=???
-RewriteCond %{QUERY_STRING} (.*(?:^|&amp;))mykey=([^&amp;]*)&amp;?(.*)&amp;?$
-RewriteRule (.*) $1?%1%3
+RewriteCond "%{QUERY_STRING}" "(.*(?:^|&amp;))mykey=([^&amp;]*)&amp;?(.*)&amp;?$"
+RewriteRule "(.*)" "$1?%1%3"
 </highlight>
   </li>
 
@@ -651,8 +664,8 @@ RewriteRule (.*) $1?%1%3
 
 <highlight language="config">
 # Copy from query string to PATH_INFO
-RewriteCond %{QUERY_STRING} (.*(?:^|&amp;))mykey=([^&amp;]*)&amp;?(.*)&amp;?$
-RewriteRule (.*) $1/products/%2/? [PT]
+RewriteCond "%{QUERY_STRING}" "(.*(?:^|&amp;))mykey=([^&amp;]*)&amp;?(.*)&amp;?$"
+RewriteRule "(.*)" "$1/products/%2/?" [PT]
 </highlight>
   </li>
 
@@ -660,9 +673,9 @@ RewriteRule (.*) $1/products/%2/? [PT]
 
 <highlight language="config">
 # Capture the value of mykey in the query string
-RewriteCond %{QUERY_STRING} (.*(?:^|&amp;))mykey=([^&amp;]*)&amp;?(.*)&amp;?$
-RewriteCond %2 !=not-so-secret-value 
-RewriteRule (.*) - [F]
+RewriteCond "%{QUERY_STRING}" "(.*(?:^|&amp;))mykey=([^&amp;]*)&amp;?(.*)&amp;?$"
+RewriteCond "%2" !=not-so-secret-value 
+RewriteRule "(.*)" - [F]
 </highlight>
   </li>
 
@@ -671,7 +684,7 @@ RewriteRule (.*) - [F]
 <highlight language="config">
 # The desired URL might be /products/kitchen-sink, and the script expects 
 # /path?products=kitchen-sink.
-RewriteRule ^/?path/([^/]+)/([^/]+) /path?$1=$2 [PT]
+RewriteRule "^/?path/([^/]+)/([^/]+)" "/path?$1=$2" [PT]
 </highlight>
   </li>
 </ul>
index 47e247f4d2972f62fb4cf6f079c85fbd6c3f1a4a..a8f664f41c972f569bf1e3fb89ccb88d6dcd00ed 100644 (file)
@@ -60,7 +60,9 @@ configuration.</note>
    <p>The syntax of the <code>RewriteMap</code> directive is as
    follows:</p>
 
-<highlight language="config">RewriteMap <em>MapName</em> <em>MapType</em>:<em>MapSource</em></highlight>
+<highlight language="config">
+RewriteMap <em>MapName</em> <em>MapType</em>:<em>MapSource</em>
+</highlight>
 
     <p>The <a id="mapfunc" name="mapfunc"><em>MapName</em></a> is an
     arbitray name that you assign to the map, and which you will use in
@@ -84,15 +86,21 @@ configuration.</note>
 
     <p>For example, you might define a
       <directive>RewriteMap</directive> as:</p>
-    <highlight language="config">RewriteMap examplemap txt:/path/to/file/map.txt</highlight>
+    <highlight language="config">
+RewriteMap examplemap "txt:/path/to/file/map.txt"
+    </highlight>
     <p>You would then be able to use this map in a
       <directive>RewriteRule</directive> as follows:</p>
-<highlight language="config">RewriteRule ^/ex/(.*) ${examplemap:$1}</highlight>
+<highlight language="config">
+RewriteRule "^/ex/(.*)" "${examplemap:$1}"
+</highlight>
 
 <p>A default value can be specified in the event that nothing is found
 in the map:</p>
 
-<highlight language="config">RewriteRule ^/ex/(.*) ${examplemap:$1|/not_found.html}</highlight>
+<highlight language="config">
+RewriteRule "^/ex/(.*)" "${examplemap:$1|/not_found.html}"
+</highlight>
 
 <note><title>Per-directory and .htaccess context</title>
 <p>
@@ -135,8 +143,8 @@ may be used, and give examples of each.</p>
     recipe:</p>
 <p><strong>Product to ID configuration</strong></p>
     <highlight language="config">
-RewriteMap product2id txt:/etc/apache2/productmap.txt
-RewriteRule ^/product/(.*) /prods.php?id=${product2id:$1|NOTFOUND} [PT]
+RewriteMap product2id "txt:/etc/apache2/productmap.txt"
+RewriteRule "^/product/(.*)" "/prods.php?id=${product2id:$1|NOTFOUND}" [PT]
     </highlight>
 
     <p>We assume here that the <code>prods.php</code> script knows what
@@ -167,7 +175,9 @@ telephone  328
     scope. If you're planning to use this in a <code>.htaccess</code>
     file, you'll need to remove the leading slash from the rewrite
     pattern in order for it to match anything:
-    <highlight language="config">RewriteRule ^product/(.*) /prods.php?id=${product2id:$1|NOTFOUND} [PT]</highlight>
+    <highlight language="config">
+RewriteRule "^product/(.*)" "/prods.php?id=${product2id:$1|NOTFOUND}" [PT]
+</highlight>
     </note>
 
     <note><title>Cached lookups</title>
@@ -205,10 +215,10 @@ dynamic  www5|www6
     </example>
 <p><strong>Configuration directives</strong></p>
     <highlight language="config">
-RewriteMap servers rnd:/path/to/file/map.txt
+RewriteMap servers "rnd:/path/to/file/map.txt"
 
-RewriteRule ^/(.*\.(png|gif|jpg)) http://${servers:static}/$1 [NC,P,L]
-RewriteRule ^/(.*) http://${servers:dynamic}/$1 [P,L]
+RewriteRule "^/(.*\.(png|gif|jpg))" "http://${servers:static}/$1" [NC,P,L]
+RewriteRule "^/(.*)" "http://${servers:dynamic}/$1" [P,L]
     </highlight>
 
     <p>So, when an image is requested and the first of these rules is
@@ -241,7 +251,7 @@ static   www1|www1|www2|www3|www4
     <p>You may optionally specify a particular dbm type:</p>
 
  <highlight language="config">
-RewriteMap examplemap dbm=sdbm:/etc/apache/mapfile.dbm
+RewriteMap examplemap "dbm=sdbm:/etc/apache/mapfile.dbm"
  </highlight>
 
     <p>The type can be sdbm, gdbm, ndbm or db.
@@ -262,7 +272,7 @@ $ httxt2dbm -i mapfile.txt -o mapfile.map
 <code>RewriteMap</code> directive:</p>
 
 <highlight language="config">
-RewriteMap mapname dbm:/etc/apache/mapfile.map
+RewriteMap mapname "dbm:/etc/apache/mapfile.map"
 </highlight>
 
 <note>
@@ -316,7 +326,7 @@ by many requests.
     <highlight language="config">
 
 RewriteMap lc int:tolower
-RewriteRule (.*?[A-Z]+.*) ${lc:$1} [R]
+RewriteRule "(.*?[A-Z]+.*)" "${lc:$1}" [R]
     </highlight>
 
     <note>
@@ -361,8 +371,8 @@ RewriteRule (.*?[A-Z]+.*) ${lc:$1} [R]
 <p><strong>Rewrite configuration</strong></p>
     <highlight language="config">
 
-RewriteMap d2u prg:/www/bin/dash2under.pl<br />
-RewriteRule - ${d2u:%{REQUEST_URI}}
+RewriteMap d2u "prg:/www/bin/dash2under.pl"<br />
+RewriteRule "-" "${d2u:%{REQUEST_URI}}"
     </highlight>
 
     <p><strong>dash2under.pl</strong></p>
index 081ecc036e3902e9cf8708ada5a15f689bca1daf..180a65770edc0b53102e6dd477dc3f96f15a7e77 100644 (file)
@@ -112,17 +112,17 @@ and URL matching.</p>
 
         <tr>
             <td>VirtualHost section</td>
-            <td>RewriteRule ^/images/(.+)\.jpg /images/$1.gif</td>
+            <td>RewriteRule "^/images/(.+)\.jpg" "/images/$1.gif"</td>
         </tr>
 
         <tr>
             <td>.htaccess file in document root</td>
-            <td>RewriteRule ^images/(.+)\.jpg images/$1.gif</td>
+            <td>RewriteRule "^images/(.+)\.jpg" "images/$1.gif"</td>
         </tr>
 
         <tr>
             <td>.htaccess file in images directory</td>
-            <td>RewriteRule ^(.+)\.jpg $1.gif</td>
+            <td>RewriteRule "^(.+)\.jpg" "$1.gif"</td>
         </tr>
 
     </table>
index afb2b9933c270b7253fad53c8f9848ab55499d55..e5ebb1f1c85de0b5b947b826b314c03063fb2493 100644 (file)
@@ -76,8 +76,8 @@ RewriteEngine on
 
 RewriteMap    lowercase int:tolower
 
-RewriteCond   ${lowercase:%{<strong>HTTP_HOST</strong>}}   ^www\.<strong>([^.]+)</strong>\.example\.com$
-RewriteRule   ^(.*) /home/<strong>%1</strong>/www$1
+RewriteCond   "${lowercase:%{<strong>HTTP_HOST</strong>}}"   "^www\.<strong>([^.]+)</strong>\.example\.com$"
+RewriteRule   "^(.*)" "/home/<strong>%1</strong>/www$1"
 </highlight></dd>
 
 <dt>Discussion</dt>
@@ -135,9 +135,9 @@ UseCanonicalName Off
 
 # splittable logs
 LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon
-CustomLog logs/access_log vcommon
+CustomLog "logs/access_log" vcommon
 
-&lt;Directory /www/hosts&gt;
+&lt;Directory "/www/hosts"&gt;
     # ExecCGI is needed here because we can't force
     # CGI execution in the way that ScriptAlias does
     Options FollowSymLinks ExecCGI
@@ -149,16 +149,16 @@ RewriteEngine On
 RewriteMap  lowercase  int:tolower
 
 ## deal with normal documents first:
-# allow Alias /icons/ to work - repeat for other aliases
-RewriteCond  %{REQUEST_URI}  !^/icons/
+# allow Alias "/icons/" to work - repeat for other aliases
+RewriteCond  "%{REQUEST_URI}"  "!^/icons/"
 # allow CGIs to work
-RewriteCond  %{REQUEST_URI}  !^/cgi-bin/
+RewriteCond  "%{REQUEST_URI}"  "!^/cgi-bin/"
 # do the magic
-RewriteRule  ^/(.*)$  /www/hosts/${lowercase:%{SERVER_NAME}}/docs/$1
+RewriteRule  "^/(.*)$"  "/www/hosts/${lowercase:%{SERVER_NAME}}/docs/$1"
 
 ## and now deal with CGIs - we have to force a handler
-RewriteCond  %{REQUEST_URI}  ^/cgi-bin/
-RewriteRule  ^/(.*)$  /www/hosts/${lowercase:%{SERVER_NAME}}/cgi-bin/$1  [H=cgi-script]
+RewriteCond  "%{REQUEST_URI}"  "^/cgi-bin/"
+RewriteRule  "^/(.*)$"  "/www/hosts/${lowercase:%{SERVER_NAME}}/cgi-bin/$1"  [H=cgi-script]
 </highlight>
 
 </section>
@@ -188,20 +188,20 @@ RewriteEngine on
 RewriteMap   lowercase  int:tolower
 
 # define the map file
-RewriteMap   vhost      txt:/www/conf/vhost.map
+RewriteMap   vhost      "txt:/www/conf/vhost.map"
 
 # deal with aliases as above
-RewriteCond  %{REQUEST_URI}               !^/icons/
-RewriteCond  %{REQUEST_URI}               !^/cgi-bin/
-RewriteCond  ${lowercase:%{SERVER_NAME}}  ^(.+)$
+RewriteCond  "%{REQUEST_URI}"               "!^/icons/"
+RewriteCond  "%{REQUEST_URI}"               "!^/cgi-bin/"
+RewriteCond  "${lowercase:%{SERVER_NAME}}"  "^(.+)$"
 # this does the file-based remap
-RewriteCond  ${vhost:%1}                  ^(/.*)$
-RewriteRule  ^/(.*)$                      %1/docs/$1
+RewriteCond  "${vhost:%1}"                  "^(/.*)$"
+RewriteRule  "^/(.*)$"                      "%1/docs/$1"
 
-RewriteCond  %{REQUEST_URI}               ^/cgi-bin/
-RewriteCond  ${lowercase:%{SERVER_NAME}}  ^(.+)$
-RewriteCond  ${vhost:%1}                  ^(/.*)$
-RewriteRule  ^/(.*)$                      %1/cgi-bin/$1 [H=cgi-script]
+RewriteCond  "%{REQUEST_URI}"               "^/cgi-bin/"
+RewriteCond  "${lowercase:%{SERVER_NAME}}"  "^(.+)$"
+RewriteCond  "${vhost:%1}"                  "^(/.*)$"
+RewriteRule  "^/(.*)$"                      "%1/cgi-bin/$1" [H=cgi-script]
 </highlight>
 
 </section>
index a2d0f27f73a7656d47d9537099ed8e01afaaf8c9..acff9a7fe193ba57fb246b00415771e884d2918a 100644 (file)
@@ -77,7 +77,7 @@ to another site only if the server is started using
 
 <highlight language="config">
 &lt;IfDefine ClosedForNow&gt;
-    Redirect / http://otherserver.example.com/
+    Redirect "/" "http://otherserver.example.com/"
 &lt;/IfDefine&gt;
 </highlight>
 
@@ -99,7 +99,7 @@ applied only if <module>mod_mime_magic</module> is available.</p>
 
 <highlight language="config">
 &lt;IfModule mod_mime_magic.c&gt;
-    MimeMagicFile conf/magic
+    MimeMagicFile "conf/magic"
 &lt;/IfModule&gt;
 </highlight>
 
@@ -161,7 +161,7 @@ following configuration, directory indexes will be enabled for the
 <code>/var/web/dir1</code> directory and all subdirectories.</p>
 
 <highlight language="config">
-&lt;Directory /var/web/dir1&gt;
+&lt;Directory "/var/web/dir1"&gt;
     Options +Indexes
 &lt;/Directory&gt;
 </highlight>
@@ -175,7 +175,7 @@ deny access to any file named <code>private.html</code> regardless
 of where it is found.</p>
 
 <highlight language="config">
-&lt;Files private.html&gt;
+&lt;Files "private.html"&gt;
     Require all denied
 &lt;/Files&gt;
 </highlight>
@@ -191,8 +191,8 @@ of <code>private.html</code> found under the <code>/var/web/dir1/</code>
 directory.</p>
 
 <highlight language="config">
-&lt;Directory /var/web/dir1&gt;
-    &lt;Files private.html&gt;
+&lt;Directory "/var/web/dir1"&gt;
+    &lt;Files "private.html"&gt;
         Require all denied
     &lt;/Files&gt;
 &lt;/Directory&gt;
@@ -213,7 +213,7 @@ In particular, it will apply to requests for
 as any other requests starting with the <code>/private</code> string.</p>
 
 <highlight language="config">
-&lt;LocationMatch ^/private&gt;
+&lt;LocationMatch "^/private"&gt;
     Require all denied
 &lt;/LocationMatch&gt;
 </highlight>
@@ -226,7 +226,7 @@ No file called <code>server-status</code> needs to exist in the
 filesystem.</p>
 
 <highlight language="config">
-&lt;Location /server-status&gt;
+&lt;Location "/server-status"&gt;
     SetHandler server-status
 &lt;/Location&gt;
 </highlight>
@@ -237,22 +237,22 @@ filesystem.</p>
 certain sections or directives are evaluated. For
 <directive type="section" module="core">Location</directive> this would be:</p>
 <highlight language="config">
-&lt;Location /foo&gt;
+&lt;Location "/foo"&gt;
 &lt;/Location&gt;
-&lt;Location /foo/bar&gt;
+&lt;Location "/foo/bar"&gt;
 &lt;/Location>
 </highlight>
 <p><directive type="section" module="mod_alias">Alias</directive>es on the other hand,
 are mapped vice-versa:</p>
 <highlight language="config">
-Alias /foo/bar /srv/www/uncommon/bar
-Alias /foo /srv/www/common/foo
+Alias "/foo/bar" "/srv/www/uncommon/bar"
+Alias "/foo" "/srv/www/common/foo"
 </highlight>
 <p>The same is true for the <directive module="mod_proxy">ProxyPass</directive>
 directives:</p>
 <highlight language="config">
-ProxyPass /special-area http://special.example.com smax=5 max=10
-ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On
+ProxyPass "/special-area" "http://special.example.com" smax=5 max=10
+ProxyPass "/" "balancer://mycluster/" stickysession=JSESSIONID|jsessionid nofailover=On
 </highlight>
 </section>
 
@@ -283,7 +283,7 @@ how directives are applied.</p>
 all user directories could look as follows:</p>
 
 <highlight language="config">
-&lt;Directory /home/*/public_html&gt;
+&lt;Directory "/home/*/public_html"&gt;
     Options Indexes
 &lt;/Directory&gt;
 </highlight>
@@ -291,7 +291,7 @@ all user directories could look as follows:</p>
 <p>Using regex sections, we can deny access to many types of image files
 at once:</p>
 <highlight language="config">
-&lt;FilesMatch \.(?i:gif|jpe?g|png)$&gt;
+&lt;FilesMatch "\.(?i:gif|jpe?g|png)$"&gt;
     Require all denied
 &lt;/FilesMatch&gt;
 </highlight>
@@ -303,8 +303,8 @@ and URLs to be referenced from within <a href="expr.html">expressions</a>
 and modules like <module>mod_rewrite</module>.</p>
 
 <highlight language="config">
-&lt;DirectoryMatch ^/var/www/combined/(?&lt;SITENAME&gt;[^/]+)&gt;
-    require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
+&lt;DirectoryMatch "^/var/www/combined/(?&lt;SITENAME&gt;[^/]+)"&gt;
+    require ldap-group "cn=%{env:MATCH_SITENAME},ou=combined,o=Example"
 &lt;/DirectoryMatch&gt;
 </highlight>
 
@@ -343,7 +343,7 @@ location, allowing your restrictions to be circumvented.
 For example, consider the following configuration:</p>
 
 <highlight language="config">
-&lt;Location /dir/&gt;
+&lt;Location "/dir/"&gt;
     Require all denied
 &lt;/Location&gt;
 </highlight>
@@ -369,7 +369,7 @@ many other ways to map multiple webspace locations to the same
 filesystem location.  Therefore you should always use the filesystem
 containers when you can.  There is, however, one exception to this
 rule.  Putting configuration restrictions in a <code>&lt;Location
-/&gt;</code> section is perfectly safe because this section will apply
+"/"&gt;</code> section is perfectly safe because this section will apply
 to all requests regardless of the specific URL.</p>
 </section>
 
@@ -410,7 +410,7 @@ will prevent the proxy server from being used to access the
 <code>www.example.com</code> website.</p>
 
 <highlight language="config">
-&lt;Proxy http://www.example.com/*&gt;
+&lt;Proxy "http://www.example.com/*"&gt;
     Require all granted
 &lt;/Proxy&gt;
 </highlight>
@@ -467,7 +467,7 @@ are interpreted, it is important to understand how this works.</p>
       <directive type="section" module="core">Directory</directive>)</li>
 
       <li><directive type="section" module="core">DirectoryMatch</directive>
-      (and <code>&lt;Directory ~&gt;</code>)</li>
+      (and <code>&lt;Directory "~"&gt;</code>)</li>
 
       <li><directive type="section"
       module="core">Files</directive> and <directive
@@ -488,9 +488,9 @@ are interpreted, it is important to understand how this works.</p>
     the order that they appear in the configuration files.  <directive
     type="section" module="core">Directory</directive> (group 1 above)
     is processed in the order shortest directory component to longest.
-    So for example, <code>&lt;Directory /var/web/dir&gt;</code> will
+    So for example, <code>&lt;Directory "/var/web/dir"&gt;</code> will
     be processed before <code>&lt;Directory
-    /var/web/dir/subdir&gt;</code>.  If multiple <directive
+    "/var/web/dir/subdir"&gt;</code>.  If multiple <directive
     type="section" module="core">Directory</directive> sections apply
     to the same directory they are processed in the configuration file
     order. Configurations included via the <directive
@@ -535,16 +535,16 @@ this example will be applied in the order A &gt; B &gt; C &gt; D &gt;
 E.</p>
 
 <highlight language="config">
-&lt;Location /&gt;
+&lt;Location "/"&gt;
     E
 &lt;/Location&gt;
 
-&lt;Files f.html&gt;
+&lt;Files "f.html"&gt;
     D
 &lt;/Files&gt;
 
 &lt;VirtualHost *&gt;
-&lt;Directory /a/b&gt;
+&lt;Directory "/a/b"&gt;
     B
 &lt;/Directory&gt;
 &lt;/VirtualHost&gt;
@@ -553,7 +553,7 @@ E.</p>
     C
 &lt;/DirectoryMatch&gt;
 
-&lt;Directory /a/b&gt;
+&lt;Directory "/a/b"&gt;
     A
 &lt;/Directory&gt;
 
@@ -567,12 +567,12 @@ evaluated last and will allow unrestricted access to the server.  In
 other words, order of merging is important, so be careful!</p>
 
 <highlight language="config">
-&lt;Location /&gt;
+&lt;Location "/"&gt;
     Require all granted
 &lt;/Location&gt;
 
 # Woops!  This &lt;Directory&gt; section will have no effect
-&lt;Directory /&gt;
+&lt;Directory "/"&gt;
     &lt;RequireAll&gt;
         Require all granted
         Require not host badguy.example.com
index 96376a02954a868a6c4565ac042616684dc42b23..d144aa84d91d415bda5eb029258546d95674b7dd 100644 (file)
@@ -174,8 +174,8 @@ relative hyperlinks?</a></li>
     manipulate relative hyperlinks, to achieve the same effect.</p>
     <highlight language="config">
 RewriteEngine on
-RewriteRule   ^/(.*)_SSL$   https://%{SERVER_NAME}/$1 [R,L]
-RewriteRule   ^/(.*)_NOSSL$ http://%{SERVER_NAME}/$1  [R,L]
+RewriteRule   "^/(.*)_SSL$"   "https://%{SERVER_NAME}/$1" [R,L]
+RewriteRule   "^/(.*)_NOSSL$" "http://%{SERVER_NAME}/$1"  [R,L]
     </highlight>
 
     <p>This rewrite ruleset lets you use hyperlinks of the form
@@ -254,8 +254,8 @@ Certificate for testing purposes?</title>
         These can be used as follows in your <code>httpd.conf</code>
         file:
         <highlight language="config">
-SSLCertificateFile    /path/to/this/server.crt
-SSLCertificateKeyFile /path/to/this/server.key
+SSLCertificateFile    "/path/to/this/server.crt"
+SSLCertificateKeyFile "/path/to/this/server.key"
         </highlight>
     </li>
     <li>It is important that you are aware that this
@@ -334,8 +334,8 @@ SSLCertificateKeyFile /path/to/this/server.key
     <code>server.crt</code>. These can be used as follows in your
     <code>httpd.conf</code> file:
        <highlight language="config">
-SSLCertificateFile    /path/to/this/server.crt
-SSLCertificateKeyFile /path/to/this/server.key
+SSLCertificateFile    "/path/to/this/server.crt"
+SSLCertificateKeyFile "/path/to/this/server.key"
        </highlight>
        The <code>server.csr</code> file is no longer needed.
     </li>
index a7bc192c7f34bc0d3a1b993c10180d0d64bb6fa7..d0fc1fe47d9d75c96018b8c00493b482a8d6a355 100644 (file)
@@ -46,8 +46,8 @@ Listen 443
 &lt;VirtualHost *:443&gt;
     ServerName www.example.com
     SSLEngine on
-    SSLCertificateFile /path/to/www.example.com.cert
-    SSLCertificateKeyFile /path/to/www.example.com.key
+    SSLCertificateFile "/path/to/www.example.com.cert"
+    SSLCertificateKeyFile "/path/to/www.example.com.key"
 &lt;/VirtualHost&gt;
 </highlight>
 
@@ -94,7 +94,7 @@ URL?</title>
 # be liberal in general
 SSLCipherSuite ALL:!aNULL:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP:+eNULL
 
-&lt;Location /strong/area&gt;
+&lt;Location "/strong/area"&gt;
 # but https://hostname/strong/area/ and below
 # requires strong ciphers
 SSLCipherSuite HIGH:!aNULL:!MD5
@@ -281,7 +281,7 @@ Intranet website, for clients coming from the Internet?</a></li>
 # signed by our CA certificate in ca.crt
 SSLVerifyClient require
 SSLVerifyDepth 1
-SSLCACertificateFile conf/ssl.crt/ca.crt
+SSLCACertificateFile "conf/ssl.crt/ca.crt"
     </highlight>
 </section>
 
@@ -295,9 +295,9 @@ SSLCACertificateFile conf/ssl.crt/ca.crt
 
     <highlight language="config">
 SSLVerifyClient none
-SSLCACertificateFile conf/ssl.crt/ca.crt
+SSLCACertificateFile "conf/ssl.crt/ca.crt"
 
-&lt;Location /secure/area&gt;
+&lt;Location "/secure/area"&gt;
 SSLVerifyClient require
 SSLVerifyDepth 1
 &lt;/Location&gt;
@@ -322,10 +322,10 @@ SSLVerifyDepth 1
 
     <highlight language="config">
 SSLVerifyClient      none
-SSLCACertificateFile conf/ssl.crt/ca.crt
-SSLCACertificatePath conf/ssl.crt
+SSLCACertificateFile "conf/ssl.crt/ca.crt"
+SSLCACertificatePath "conf/ssl.crt"
 
-&lt;Directory /usr/local/apache2/htdocs/secure/area&gt;
+&lt;Directory "/usr/local/apache2/htdocs/secure/area"&gt;
     SSLVerifyClient      require
     SSLVerifyDepth       5
     SSLOptions           +FakeBasicAuth
@@ -333,7 +333,7 @@ SSLCACertificatePath conf/ssl.crt
     AuthName             "Snake Oil Authentication"
     AuthType             Basic
     AuthBasicProvider    file
-    AuthUserFile         /usr/local/apache2/conf/httpd.passwd
+    AuthUserFile         "/usr/local/apache2/conf/httpd.passwd"
     Require              valid-user
 &lt;/Directory&gt;
     </highlight>
@@ -355,10 +355,10 @@ SSLCACertificatePath conf/ssl.crt
 
     <highlight language="config">
 SSLVerifyClient      none
-SSLCACertificateFile conf/ssl.crt/ca.crt
-SSLCACertificatePath conf/ssl.crt
+SSLCACertificateFile "conf/ssl.crt/ca.crt"
+SSLCACertificatePath "conf/ssl.crt"
 
-&lt;Directory /usr/local/apache2/htdocs/secure/area&gt;
+&lt;Directory "/usr/local/apache2/htdocs/secure/area"&gt;
   SSLVerifyClient      require
   SSLVerifyDepth       5
   SSLOptions           +FakeBasicAuth
@@ -382,14 +382,14 @@ plain HTTP access for clients on the Intranet.</title>
    that it applies to both HTTPS and HTTP.</p>
 
     <highlight language="config">
-SSLCACertificateFile conf/ssl.crt/company-ca.crt
+SSLCACertificateFile "conf/ssl.crt/company-ca.crt"
 
-&lt;Directory /usr/local/apache2/htdocs&gt;
+&lt;Directory "/usr/local/apache2/htdocs"&gt;
     #   Outside the subarea only Intranet access is granted
     Require              ip 192.168.1.0/24
 &lt;/Directory&gt;
 
-&lt;Directory /usr/local/apache2/htdocs/subarea&gt;
+&lt;Directory "/usr/local/apache2/htdocs/subarea"&gt;
     #   Inside the subarea any Intranet access is allowed
     #   but from the Internet only HTTPS + Strong-Cipher + Password
     #   or the alternative HTTPS + Strong-Cipher + Client-Certificate
@@ -403,9 +403,9 @@ SSLCACertificateFile conf/ssl.crt/company-ca.crt
     
     #   Force clients from the Internet to use HTTPS
     RewriteEngine        on
-    RewriteCond          %{REMOTE_ADDR} !^192\.168\.1\.[0-9]+$
-    RewriteCond          %{HTTPS} !=on
-    RewriteRule          . - [F]
+    RewriteCond          "%{REMOTE_ADDR}" "!^192\.168\.1\.[0-9]+$"
+    RewriteCond          "%{HTTPS}" "!=on"
+    RewriteRule          "." "-" [F]
     
     #   Allow Network Access and/or Basic Auth
     Satisfy              any
@@ -417,7 +417,7 @@ SSLCACertificateFile conf/ssl.crt/company-ca.crt
     AuthType             basic
     AuthName             "Protected Intranet Area"
     AuthBasicProvider    file
-    AuthUserFile         conf/protected.passwd
+    AuthUserFile         "conf/protected.passwd"
     Require              valid-user
 &lt;/Directory&gt;
     </highlight>
index 5e22e38a5d9d60f87200c539bfd5f7d5184305f5..5273b050dcf6fb6ce80a1638c440d85be6d75d36 100644 (file)
     module="mod_alias">Alias</directive> directive will map any part
     of the filesystem into the web space. For example, with</p>
 
-<highlight language="config">Alias /docs /var/web</highlight>
+<highlight language="config">
+Alias "/docs" "/var/web"
+</highlight>
 
     <p>the URL <code>http://www.example.com/docs/dir/file.html</code>
     will be served from <code>/var/web/dir/file.html</code>. The
     example,</p>
 
     <highlight language="config">
-    ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+)   /home/$1/cgi-bin/$2
+    ScriptAliasMatch "^/~([a-zA-Z0-9]+)/cgi-bin/(.+)"   "/home/$1/cgi-bin/$2"
     </highlight>
 
     <p>will map a request to
     <code>AliasMatch</code> directive:</p>
 
     <highlight language="config">
-    AliasMatch ^/upages/([a-zA-Z0-9]+)(/(.*))?$   /home/$1/public_html/$3
+    AliasMatch "^/upages/([a-zA-Z0-9]+)(/(.*))?$"   "/home/$1/public_html/$3"
     </highlight>
 </section>
 
     to request the content at the new location as follows:</p>
 
     <highlight language="config">
-    Redirect permanent /foo/   http://www.example.com/bar/
+    Redirect permanent "/foo/"   "http://www.example.com/bar/"
     </highlight>
 
     <p>This will redirect any URL-Path starting in
     requests alone, use the following configuration:</p>
 
     <highlight language="config">
-    RedirectMatch permanent ^/$    http://www.example.com/startpage.html
+    RedirectMatch permanent "^/$"    "http://www.example.com/startpage.html"
     </highlight>
 
     <p>Alternatively, to temporarily redirect all pages on one site
     to a particular page on another site, use the following:</p>
 
     <highlight language="config">
-    RedirectMatch temp .*  http://othersite.example.com/startpage.html
+    RedirectMatch temp ".*"  "http://othersite.example.com/startpage.html"
     </highlight>
 </section>
 
@@ -267,10 +269,10 @@ and returns them to the client as if they were from the local
 server.</p>
 
 <highlight language="config">
-ProxyPass /foo/ http://internal.example.com/bar/<br />
-ProxyPassReverse /foo/ http://internal.example.com/bar/<br />
+ProxyPass "/foo/" "http://internal.example.com/bar/"<br />
+ProxyPassReverse "/foo/" "http://internal.example.com/bar/"<br />
 ProxyPassReverseCookieDomain internal.example.com public.example.com<br />
-ProxyPassReverseCookiePath /foo/ /bar/
+ProxyPassReverseCookiePath "/foo/" "/bar/"
 </highlight>
 
 <p>The <directive module="mod_proxy">ProxyPass</directive> configures
@@ -291,7 +293,7 @@ content) in a page as it is being served to the client using
 <module>mod_substitute</module>.</p>
 
 <highlight language="config">
-Substitute s/internal\.example\.com/www.example.com/i
+Substitute "s/internal\.example\.com/www.example.com/i"
 </highlight>
 
 <p>For more sophisticated rewriting of links in HTML and XHTML, the 
index f00b9454f0080b7901b2848a020f90fec57a0a17..44540348e68e0e279131ccc4daca2cc9f0ec2a25 100644 (file)
 # Ensure that Apache listens on port 80
 Listen 80
 &lt;VirtualHost *:80&gt;
-    DocumentRoot /www/example1
+    DocumentRoot "/www/example1"
     ServerName www.example.com
   
     # Other directives here
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost *:80&gt;
-    DocumentRoot /www/example2
+    DocumentRoot "/www/example2"
     ServerName www.example.org
 
     # Other directives here
@@ -121,17 +121,17 @@ Listen 80
 
 # This is the "main" server running on 172.20.30.40
 ServerName server.example.com
-DocumentRoot /www/mainserver
+DocumentRoot "/www/mainserver"
 
 &lt;VirtualHost 172.20.30.50&gt;
-    DocumentRoot /www/example1
+    DocumentRoot "/www/example1"
     ServerName www.example.com
     
     # Other directives here ...
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 172.20.30.50&gt;
-    DocumentRoot /www/example2
+    DocumentRoot "/www/example2"
     ServerName www.example.org
     
     # Other directives here ...
@@ -163,7 +163,7 @@ DocumentRoot /www/mainserver
 
     <highlight language="config">
 &lt;VirtualHost 192.168.1.1 172.20.30.40&gt;
-    DocumentRoot /www/server1
+    DocumentRoot "/www/server1"
     ServerName server.example.com
     ServerAlias server
 &lt;/VirtualHost&gt;
@@ -199,22 +199,22 @@ Listen 8080
 
 &lt;VirtualHost 172.20.30.40:80&gt;
     ServerName www.example.com
-    DocumentRoot /www/domain-80
+    DocumentRoot "/www/domain-80"
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 172.20.30.40:8080&gt;
     ServerName www.example.com
-    DocumentRoot /www/domain-8080
+    DocumentRoot "/www/domain-8080"
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 172.20.30.40:80&gt;
     ServerName www.example.org
-    DocumentRoot /www/otherdomain-80
+    DocumentRoot "/www/otherdomain-80"
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 172.20.30.40:8080&gt;
     ServerName www.example.org
-    DocumentRoot /www/otherdomain-8080
+    DocumentRoot "/www/otherdomain-8080"
 &lt;/VirtualHost&gt;
     </highlight>
 
@@ -231,12 +231,12 @@ Listen 8080
 Listen 80
 
 &lt;VirtualHost 172.20.30.40&gt;
-    DocumentRoot /www/example1
+    DocumentRoot "/www/example1"
     ServerName www.example.com
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 172.20.30.50&gt;
-    DocumentRoot /www/example2
+    DocumentRoot "/www/example2"
     ServerName www.example.org
 &lt;/VirtualHost&gt;
     </highlight>
@@ -264,22 +264,22 @@ Listen 172.20.30.50:80
 Listen 172.20.30.50:8080
 
 &lt;VirtualHost 172.20.30.40:80&gt;
-    DocumentRoot /www/example1-80
+    DocumentRoot "/www/example1-80"
     ServerName www.example.com
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 172.20.30.40:8080&gt;
-    DocumentRoot /www/example1-8080
+    DocumentRoot "/www/example1-8080"
     ServerName www.example.com
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 172.20.30.50:80&gt;
-    DocumentRoot /www/example2-80
+    DocumentRoot "/www/example2-80"
     ServerName www.example.org
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 172.20.30.50:8080&gt;
-    DocumentRoot /www/example2-8080
+    DocumentRoot "/www/example2-8080"
     ServerName www.example.org
 &lt;/VirtualHost&gt;
     </highlight>
@@ -295,28 +295,28 @@ Listen 172.20.30.50:8080
     <highlight language="config">
 Listen 80
 &lt;VirtualHost 172.20.30.40&gt;
-    DocumentRoot /www/example1
+    DocumentRoot "/www/example1"
     ServerName www.example.com
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 172.20.30.40&gt;
-    DocumentRoot /www/example2
+    DocumentRoot "/www/example2"
     ServerName www.example.org
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 172.20.30.40&gt;
-    DocumentRoot /www/example3
+    DocumentRoot "/www/example3"
     ServerName www.example.net
 &lt;/VirtualHost&gt;
 
 # IP-based
 &lt;VirtualHost 172.20.30.50&gt;
-    DocumentRoot /www/example4
+    DocumentRoot "/www/example4"
     ServerName www.example.edu
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 172.20.30.60&gt;
-    DocumentRoot /www/example5
+    DocumentRoot "/www/example5"
     ServerName www.example.gov
 &lt;/VirtualHost&gt;
     </highlight>
@@ -338,8 +338,8 @@ Listen 80
     <highlight language="config">
 &lt;VirtualHost *:*&gt;
     ProxyPreserveHost On
-    ProxyPass / http://192.168.111.2/
-    ProxyPassReverse / http://192.168.111.2/
+    ProxyPass "/" "http://192.168.111.2/"
+    ProxyPassReverse "/" "http://192.168.111.2/"
     ServerName hostname.example.com
 &lt;/VirtualHost&gt;
     </highlight>
@@ -358,7 +358,7 @@ Listen 80
 
     <highlight language="config">
 &lt;VirtualHost _default_:*&gt;
-    DocumentRoot /www/default
+    DocumentRoot "/www/default"
 &lt;/VirtualHost&gt;
     </highlight>
 
@@ -384,12 +384,12 @@ Listen 80
 
     <highlight language="config">
 &lt;VirtualHost _default_:80&gt;
-    DocumentRoot /www/default80
+    DocumentRoot "/www/default80"
     # ...
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost _default_:*&gt;
-    DocumentRoot /www/default
+    DocumentRoot "/www/default"
     # ...
 &lt;/VirtualHost&gt;
     </highlight>
@@ -408,7 +408,7 @@ Listen 80
 
     <highlight language="config">
 &lt;VirtualHost _default_:80&gt;
-DocumentRoot /www/default
+DocumentRoot "/www/default"
 ...
 &lt;/VirtualHost&gt;
     </highlight>
@@ -442,16 +442,16 @@ DocumentRoot /www/default
     <highlight language="config">
 Listen 80
 ServerName www.example.com
-DocumentRoot /www/example1
+DocumentRoot "/www/example1"
 
 &lt;VirtualHost 172.20.30.40 172.20.30.50&gt;
-    DocumentRoot /www/example2
+    DocumentRoot "/www/example2"
     ServerName www.example.org
     # ...
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 172.20.30.40&gt;
-    DocumentRoot /www/example3
+    DocumentRoot "/www/example3"
     ServerName www.example.net
     ServerAlias *.example.net
     # ...
@@ -479,27 +479,27 @@ DocumentRoot /www/example1
     <highlight language="config">
 &lt;VirtualHost 172.20.30.40&gt;
     # primary vhost
-    DocumentRoot /www/subdomain
+    DocumentRoot "/www/subdomain"
     RewriteEngine On
-    RewriteRule . /www/subdomain/index.html
+    RewriteRule "." "/www/subdomain/index.html"
     # ...
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 172.20.30.40&gt;
-DocumentRoot /www/subdomain/sub1
+DocumentRoot "/www/subdomain/sub1"
     ServerName www.sub1.domain.tld
-    ServerPath /sub1/
+    ServerPath "/sub1/"
     RewriteEngine On
-    RewriteRule ^(/sub1/.*) /www/subdomain$1
+    RewriteRule "^(/sub1/.*)" "/www/subdomain$1"
     # ...
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 172.20.30.40&gt;
-    DocumentRoot /www/subdomain/sub2
+    DocumentRoot "/www/subdomain/sub2"
     ServerName www.sub2.domain.tld
-    ServerPath /sub2/
+    ServerPath "/sub2/"
     RewriteEngine On
-    RewriteRule ^(/sub2/.*) /www/subdomain$1
+    RewriteRule "^(/sub2/.*)" "/www/subdomain$1"
     # ...
 &lt;/VirtualHost&gt;
     </highlight>
index 69c323b3bb54705c99124aca0d32ce4fbd0a5d45..c792cab868a6f5107331eb3eaafe7731f455d8de 100644 (file)
@@ -136,18 +136,18 @@ Virtual Hosts</a> to help you decide.  </p>
     <highlight language="config">
 &lt;VirtualHost 172.20.30.40:80&gt;
     ServerAdmin webmaster@www1.example.com
-    DocumentRoot /www/vhosts/www1
+    DocumentRoot "/www/vhosts/www1"
     ServerName www1.example.com
-    ErrorLog /www/logs/www1/error_log
-    CustomLog /www/logs/www1/access_log combined
+    ErrorLog "/www/logs/www1/error_log"
+    CustomLog "/www/logs/www1/access_log" combined
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 172.20.30.50:80&gt;
     ServerAdmin webmaster@www2.example.org
-    DocumentRoot /www/vhosts/www2
+    DocumentRoot "/www/vhosts/www2"
     ServerName www2.example.org
-    ErrorLog /www/logs/www2/error_log
-    CustomLog /www/logs/www2/access_log combined
+    ErrorLog "/www/logs/www2/error_log"
+    CustomLog "/www/logs/www2/access_log" combined
 &lt;/VirtualHost&gt;
     </highlight>
 
index 3a5afcb43682635873ed5edd42bbadb9b1c45da2..bf5e6fad196be2ff3767c0b3851441d6469f0e0f 100644 (file)
 <highlight language="config">
 &lt;VirtualHost 111.22.33.44&gt;
     ServerName                 customer-1.example.com
-    DocumentRoot        /www/hosts/customer-1.example.com/docs
-    ScriptAlias  /cgi-bin/  /www/hosts/customer-1.example.com/cgi-bin
+    DocumentRoot        "/www/hosts/customer-1.example.com/docs"
+    ScriptAlias  "/cgi-bin/"  "/www/hosts/customer-1.example.com/cgi-bin"
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 111.22.33.44&gt;
     ServerName                 customer-2.example.com
-    DocumentRoot        /www/hosts/customer-2.example.com/docs
-    ScriptAlias  /cgi-bin/  /www/hosts/customer-2.example.com/cgi-bin
+    DocumentRoot        "/www/hosts/customer-2.example.com/docs"
+    ScriptAlias  "/cgi-bin/"  "/www/hosts/customer-2.example.com/cgi-bin"
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 111.22.33.44&gt;
     ServerName                 customer-N.example.com
-    DocumentRoot        /www/hosts/customer-N.example.com/docs
-    ScriptAlias  /cgi-bin/  /www/hosts/customer-N.example.com/cgi-bin
+    DocumentRoot        "/www/hosts/customer-N.example.com/docs"
+    ScriptAlias  "/cgi-bin/"  "/www/hosts/customer-N.example.com/cgi-bin"
 &lt;/VirtualHost&gt;
 </highlight>
 
@@ -154,11 +154,11 @@ UseCanonicalName Off
 # this log format can be split per-virtual-host based on the first field
 # using the split-logfile utility.
 LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
-CustomLog logs/access_log vcommon
+CustomLog "logs/access_log" vcommon
 
 # include the server name in the filenames used to satisfy requests
-VirtualDocumentRoot /www/hosts/%0/docs
-VirtualScriptAlias  /www/hosts/%0/cgi-bin
+VirtualDocumentRoot "/www/hosts/%0/docs"
+VirtualScriptAlias  "/www/hosts/%0/cgi-bin"
 </highlight>
 
     <p>This configuration can be changed into an IP-based virtual
@@ -191,10 +191,10 @@ LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
 CustomLog logs/access_log vcommon
 
 # include part of the server name in the filenames
-VirtualDocumentRoot /home/%2/www
+VirtualDocumentRoot "/home/%2/www"
 
 # single cgi-bin directory
-ScriptAlias  /cgi-bin/  /www/std-cgi/
+ScriptAlias  "/cgi-bin/"  "/www/std-cgi/"
 </highlight>
 
     <p>There are examples of more complicated
@@ -220,12 +220,12 @@ UseCanonicalName Off
 
 LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
 
-&lt;Directory /www/commercial&gt;
+&lt;Directory "/www/commercial"&gt;
     Options FollowSymLinks
     AllowOverride All
 &lt;/Directory&gt;
 
-&lt;Directory /www/homepages&gt;
+&lt;Directory "/www/homepages"&gt;
     Options FollowSymLinks
     AllowOverride None
 &lt;/Directory&gt;
@@ -233,19 +233,19 @@ LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
 &lt;VirtualHost 111.22.33.44&gt;
     ServerName www.commercial.example.com
     
-    CustomLog logs/access_log.commercial vcommon
+    CustomLog "logs/access_log.commercial" vcommon
     
-    VirtualDocumentRoot /www/commercial/%0/docs
-    VirtualScriptAlias  /www/commercial/%0/cgi-bin
+    VirtualDocumentRoot "/www/commercial/%0/docs"
+    VirtualScriptAlias  "/www/commercial/%0/cgi-bin"
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 111.22.33.45&gt;
     ServerName www.homepages.example.com
     
-    CustomLog logs/access_log.homepages vcommon
+    CustomLog "logs/access_log.homepages" vcommon
     
-    VirtualDocumentRoot /www/homepages/%0/docs
-    ScriptAlias         /cgi-bin/ /www/std-cgi/
+    VirtualDocumentRoot "/www/homepages/%0/docs"
+    ScriptAlias         "/cgi-bin/" "/www/std-cgi/"
 &lt;/VirtualHost&gt;
 </highlight>
 
@@ -278,11 +278,11 @@ UseCanonicalName DNS
 
 # include the IP address in the logs so they may be split
 LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon
-CustomLog logs/access_log vcommon
+CustomLog "logs/access_log" vcommon
 
 # include the IP address in the filenames
-VirtualDocumentRootIP /www/hosts/%0/docs
-VirtualScriptAliasIP  /www/hosts/%0/cgi-bin
+VirtualDocumentRootIP "/www/hosts/%0/docs"
+VirtualScriptAliasIP  "/www/hosts/%0/cgi-bin"
 </highlight>
 
 </section>
index c64df7e19d9e94c4fd5d575ed438c52a2f267758..91e2b5ed1148a552e49e5deb1f2079f86f3c4be4 100644 (file)
     # This first-listed virtual host is also the default for *:80
     ServerName www.example.com
     ServerAlias example.com 
-    DocumentRoot /www/domain
+    DocumentRoot "/www/domain"
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost *:80&gt;
     ServerName other.example.com
-    DocumentRoot /www/otherdomain
+    DocumentRoot "/www/otherdomain"
 &lt;/VirtualHost&gt;
     </highlight>