From 45c7b5bc133d9da7bb179574541d99680660ca86 Mon Sep 17 00:00:00 2001 From: Ken Coar Date: Wed, 15 Apr 2015 19:10:38 +0000 Subject: [PATCH] Break foo into separate lines. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1673932 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/content-negotiation.xml | 8 +- docs/manual/howto/access.xml | 11 +-- docs/manual/howto/auth.xml | 17 ++-- docs/manual/howto/public_html.xml | 24 ++++-- docs/manual/misc/perf-tuning.xml | 23 +++--- docs/manual/misc/security_tips.xml | 10 ++- docs/manual/mod/core.xml | 122 ++++++++++++++++++++-------- docs/manual/mod/mod_asis.xml | 4 +- docs/manual/mod/mod_authnz_ldap.xml | 21 +++-- docs/manual/mod/mod_cern_meta.xml | 8 +- docs/manual/mod/mod_filter.xml | 9 +- docs/manual/mod/mod_imagemap.xml | 8 +- docs/manual/mod/mod_journald.xml | 4 +- docs/manual/mod/mod_mime.xml | 50 ++++++------ docs/manual/mod/mod_proxy.xml | 24 +++--- docs/manual/mod/mod_proxy_ftp.xml | 4 +- docs/manual/mod/mod_so.xml | 7 +- docs/manual/mod/mod_syslog.xml | 4 +- docs/manual/mod/mod_xml2enc.xml | 4 +- docs/manual/rewrite/flags.xml | 67 +++++++++------ docs/manual/rewrite/remapping.xml | 10 ++- docs/manual/rewrite/rewritemap.xml | 24 ++++-- 22 files changed, 302 insertions(+), 161 deletions(-) diff --git a/docs/manual/content-negotiation.xml b/docs/manual/content-negotiation.xml index dafedd4752..53db7ba1c5 100644 --- a/docs/manual/content-negotiation.xml +++ b/docs/manual/content-negotiation.xml @@ -120,7 +120,9 @@ defines a file suffix as type-map; this is best done with

-AddHandler type-map .var + +AddHandler type-map .var +

in the server configuration file.

@@ -223,7 +225,9 @@ module="mod_dir">DirectoryIndex directive, if the server is trying to index a directory. If the configuration files specify

-DirectoryIndex index + +DirectoryIndex index +

then the server will arbitrate between index.html and index.html3 if both are present. If neither are present, and index.cgi is there, the server diff --git a/docs/manual/howto/access.xml b/docs/manual/howto/access.xml index 3353c91a2b..f2242a1915 100644 --- a/docs/manual/howto/access.xml +++ b/docs/manual/howto/access.xml @@ -85,7 +85,7 @@ Require ip ip.address syntax.

You can insert not to negate a particular requirement. - Note, that since a not is a negation of a value, it cannot + Note, that since a not is a negation of a value, it cannot be used by itself to allow or deny a request, as not true does not constitute false. Thus, to deny a visit using a negation, the block must have one element that evaluates as true or false. @@ -101,11 +101,13 @@ Require ip ip.address

Visitors coming from that address (10.252.46.165) - will not be able to see the content covered by this directive. If, - instead, you have a machine name, rather than an IP address, you + will not be able to see the content covered by this directive. If, + instead, you have a machine name, rather than an IP address, you can use that.

- Require not host host.example.com + +Require not host host.example.com +

And, if you'd like to block access from an entire domain, you can specify just part of an address or domain name:

@@ -203,4 +205,3 @@ RewriteRule ^/fridge - [F] - diff --git a/docs/manual/howto/auth.xml b/docs/manual/howto/auth.xml index d53846c55b..f8cd5d7530 100644 --- a/docs/manual/howto/auth.xml +++ b/docs/manual/howto/auth.xml @@ -127,7 +127,9 @@ module from each group.

an AllowOverride directive like the following:

- AllowOverride AuthConfig + +AllowOverride AuthConfig +

Or, if you are just going to put the directives directly in your main server configuration file, you will of course need to @@ -322,7 +324,9 @@ Require group GroupName specific. Rather than creating a group file, you can just use the following directive:

- Require valid-user + +Require valid-user +

Using that rather than the Require user rbowen line will allow anyone in that is listed in the password file, @@ -503,12 +507,16 @@ Require group GroupName that will be called during the authorization stage of the request processing. For example:

- Require ip address + +Require ip address +

where address is an IP address (or a partial IP address) or:

- Require host domain_name + +Require host domain_name +

where domain_name is a fully qualified domain name (or a partial domain name); you may provide multiple addresses or @@ -597,4 +605,3 @@ Require group GroupName - diff --git a/docs/manual/howto/public_html.xml b/docs/manual/howto/public_html.xml index 063501378b..e523ccc630 100644 --- a/docs/manual/howto/public_html.xml +++ b/docs/manual/howto/public_html.xml @@ -72,7 +72,9 @@ assumed to be a directory path relative to the home directory of the specified user. Given this configuration:

- UserDir public_html + +UserDir public_html +

the URL http://example.com/~rbowen/file.html will be translated to the file path @@ -82,7 +84,9 @@ constructed using that path, plus the username specified. Given this configuration:

- UserDir /var/html + +UserDir /var/html +

the URL http://example.com/~rbowen/file.html will be translated to the file path /var/html/rbowen/file.html

@@ -91,7 +95,9 @@ in which the asterisk is replaced with the username. Given this configuration:

- UserDir /var/www/*/docs + +UserDir /var/www/*/docs +

the URL http://example.com/~rbowen/file.html will be translated to the file path @@ -99,7 +105,9 @@

Multiple directories or directory paths can also be set.

- UserDir public_html /var/html + +UserDir public_html /var/html +

For the URL http://example.com/~rbowen/file.html, Apache will search for ~rbowen. If it isn't found, @@ -114,7 +122,9 @@

The UserDir directive can be used to redirect user directory requests to external URLs.

- UserDir http://example.org/users/*/ + +UserDir http://example.org/users/*/ +

The above example will redirect a request for http://example.com/~bob/abc.html to @@ -128,7 +138,9 @@

Using the syntax shown in the UserDir documentation, you can restrict what users are permitted to use this functionality:

- UserDir disabled root jro fish + +UserDir disabled root jro fish +

The configuration above will enable the feature for all users except for those listed in the disabled statement. diff --git a/docs/manual/misc/perf-tuning.xml b/docs/manual/misc/perf-tuning.xml index 5429f0b872..5c9cd64037 100644 --- a/docs/manual/misc/perf-tuning.xml +++ b/docs/manual/misc/perf-tuning.xml @@ -248,11 +248,15 @@ DocumentRoot "/www/htdocs" penalties. There's one case where you can speed up the server. Instead of using a wildcard such as:

- DirectoryIndex index + +DirectoryIndex index +

Use a complete list of options:

- DirectoryIndex index.cgi index.pl index.shtml index.html + +DirectoryIndex index.cgi index.pl index.shtml index.html +

where you list the most common choice first.

@@ -431,10 +435,10 @@ DocumentRoot "/www/htdocs" one connection at a time. Worker generally is a good choice for high-traffic servers because it has a smaller memory footprint than the prefork MPM. - -
  • The event MPM is threaded like the - Worker MPM, but is designed to allow more requests to be - served simultaneously by passing off some processing work + +
  • The event MPM is threaded like the + Worker MPM, but is designed to allow more requests to be + served simultaneously by passing off some processing work to supporting threads, freeing up the main threads to work on new requests.
  • @@ -644,7 +648,7 @@ DocumentRoot "/www/htdocs" accept_mutex_on (); for (;;) { fd_set accept_fds; - + FD_ZERO (&accept_fds); for (i = first_socket; i <= last_socket; ++i) { FD_SET (i, &accept_fds); @@ -776,7 +780,7 @@ DocumentRoot "/www/htdocs" void lingering_close (int s) { char junk_buffer[2048]; - + /* shutdown the sending side */ shutdown (s, 1); @@ -793,7 +797,7 @@ DocumentRoot "/www/htdocs" /* just toss away whatever is here */ } } - + close (s); } @@ -1013,4 +1017,3 @@ DocumentRoot "/www/htdocs" - diff --git a/docs/manual/misc/security_tips.xml b/docs/manual/misc/security_tips.xml index af003eb889..ae8f4bef01 100644 --- a/docs/manual/misc/security_tips.xml +++ b/docs/manual/misc/security_tips.xml @@ -117,7 +117,7 @@
  • The use of a threaded mpm may allow you to handle more simultaneous connections, thereby - mitigating DoS attacks. Further, the + mitigating DoS attacks. Further, the event mpm uses asynchronous processing to avoid devoting a thread to each connection. Due to the nature of the OpenSSL library the @@ -392,7 +392,9 @@ recommend that you include the following line in your server configuration files:

    - UserDir disabled root + +UserDir disabled root + @@ -451,10 +453,10 @@ directive specific. Always test your changes when creating dependencies on how directives are merged.

    -

    For modules that don't implement any merging logic, such as +

    For modules that don't implement any merging logic, such as mod_access_compat, the behavior in later sections depends on whether the later section has any directives - from the module. The configuration is inherited until a change is made, + from the module. The configuration is inherited until a change is made, at which point the configuration is replaced and not merged.

    diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index 7eac6064be..f8fd4933c2 100644 --- a/docs/manual/mod/core.xml +++ b/docs/manual/mod/core.xml @@ -195,7 +195,9 @@ AcceptFilter https data configuration files are enabled for that directory. For example:

    - AccessFileName .acl + +AccessFileName .acl +

    before returning the document /usr/local/web/index.html, the server will read @@ -240,7 +242,9 @@ content-type is text/plain or text/html charset values for use in Internet media types (MIME types). For example:

    - AddDefaultCharset utf-8 + +AddDefaultCharset utf-8 +

    AddDefaultCharset should only be used when all of the text resources to which it applies are known to be in that @@ -464,7 +468,9 @@ NoDecode option available in 2.3.12 and later.

    Example:

    - AllowOverride AuthConfig Indexes + +AllowOverride AuthConfig Indexes +

    In the example above all directives that are neither in the group AuthConfig nor Indexes cause an internal @@ -697,7 +703,9 @@ which no other media type configuration could be found. of configuration files, it may be specified with the value none, meaning no default media type. For example:

    - DefaultType None + +DefaultType None +

    DefaultType None is only available in httpd-2.2.7 and later.

    @@ -1115,7 +1123,9 @@ for a complete reference and more examples.

    For server configurations that are vulnerable to these problems, you should disable memory-mapping of delivered files by specifying:

    - EnableMMAP Off + +EnableMMAP Off +

    For NFS mounted files, this feature may be disabled explicitly for the offending files by specifying:

    @@ -1171,7 +1181,9 @@ version 2.3.9.

    For server configurations that are not vulnerable to these problems, you may enable this feature by specifying:

    - EnableSendfile On + +EnableSendfile On +

    For network mounted files, this feature may be disabled explicitly for the offending files by specifying:

    @@ -1351,13 +1363,17 @@ ErrorDocument 404 /cgi-bin/bad_urls.pl the file-path is not absolute then it is assumed to be relative to the ServerRoot.

    - ErrorLog "/var/log/httpd/error_log" + +ErrorLog "/var/log/httpd/error_log" +

    If the file-path begins with a pipe character "|" then it is assumed to be a command to spawn to handle the error log.

    - ErrorLog "|/usr/local/bin/httpd_errors" + +ErrorLog "|/usr/local/bin/httpd_errors" +

    See the notes on piped logs for more information.

    @@ -1371,7 +1387,9 @@ ErrorDocument 404 /cgi-bin/bad_urls.pl in individual virtual hosts, the final facility specified affects the entire server.

    - ErrorLog syslog:user + +ErrorLog syslog:user +

    Additional modules can provide their own ErrorLog providers. The syntax is similar to syslog example above.

    @@ -1672,7 +1690,9 @@ earlier.
    The number of bytes in the file will be included
    All
    All available fields will be used. This is equivalent to: - FileETag INode MTime Size
    + +FileETag INode MTime Size +
    None
    If a document is file-based, no ETag field will be included in the response
    @@ -1843,7 +1863,9 @@ media type in the HTTP Content-Type header field GIF files, but did not want to label them all with .gif, you might want to use:

    - ForceType image/gif + +ForceType image/gif +

    Note that this directive overrides other indirect media type associations defined in mime.types or via the @@ -1953,7 +1975,9 @@ satisfied by a request at runtime directives if and only if the expression evaluates to true. For example:

    - <If "-z req('Host')"> + +<If "-z req('Host')"> +

    would match HTTP/1.0 requests without a Host: header. Expressions may contain various shell-like operators for string @@ -1962,7 +1986,9 @@ satisfied by a request at runtime and others (-n, -z, -f, ...). It is also possible to use regular expressions,

    - <If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/"> + +<If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/"> +

    shell-like pattern matches and many other operations. These operations can be done on request headers (req), environment variables @@ -2164,12 +2190,16 @@ Include conf/vhosts/*.conf path. This example will fail if there is no subdirectory in conf/vhosts that contains at least one *.conf file:

    - Include conf/vhosts/*/*.conf + +Include conf/vhosts/*/*.conf +

    Alternatively, the following command will just be ignored in case of missing files or directories:

    - IncludeOptional conf/vhosts/*/*.conf + +IncludeOptional conf/vhosts/*/*.conf + @@ -2406,7 +2436,9 @@ subrequests determines, how deep subrequests may be nested. If you specify only one number, it will be assigned to both limits.

    - LimitInternalRecursion 5 + +LimitInternalRecursion 5 + @@ -2449,7 +2481,9 @@ from the client location, and wish to limit the size of the uploaded file to 100K, you might use the following directive:

    - LimitRequestBody 102400 + +LimitRequestBody 102400 +

    For a full description of how this directive is interpreted by proxy requests, see the mod_proxy documentation.

    @@ -2492,7 +2526,9 @@ will be accepted from the client

    For example:

    - LimitRequestFields 50 + +LimitRequestFields 50 + Warning

    When name-based virtual hosting is used, the value for this @@ -2531,7 +2567,9 @@ client

    For example:

    - LimitRequestFieldSize 4094 + +LimitRequestFieldSize 4094 + Under normal conditions, the value should not be changed from the default. @@ -2572,7 +2610,9 @@ from the client

    For example:

    - LimitRequestLine 4094 + +LimitRequestLine 4094 + Under normal conditions, the value should not be changed from the default. @@ -2601,7 +2641,9 @@ from the client

    Example:

    - LimitXMLRequestBody 0 + +LimitXMLRequestBody 0 + @@ -2970,7 +3012,9 @@ matching URLs

    For example:

    - LogLevel notice + +LogLevel notice + Note

    When logging to a regular file messages of the level @@ -3085,7 +3129,9 @@ connection

    For example:

    - MaxKeepAliveRequests 500 + +MaxKeepAliveRequests 500 + @@ -3626,7 +3672,9 @@ directory

    For example, if you are running https on a non-standard port, specify the protocol explicitly:

    - Protocol https + +Protocol https +

    You can also specify the protocol using the Listen directive.

    @@ -3859,7 +3907,9 @@ messages sent to the client

    It may be worth setting up a dedicated address for this, e.g.

    - ServerAdmin www-admin@foo.example.com + +ServerAdmin www-admin@foo.example.com +

    as users do not always mention that they are talking about the server!

    @@ -3896,7 +3946,7 @@ to name-virtual hosts (nor for ServerName vs. ServerAlias).

    The complete list of names in the VirtualHost - directive are treated just like a (non wildcard) + directive are treated just like a (non wildcard) ServerAlias.

    @@ -3929,7 +3979,9 @@ itself and you wish the web server to be so identified, the following directive should be used:

    - ServerName www.example.com + +ServerName www.example.com +

    The ServerName directive may appear anywhere within the definition of a server. However, @@ -3939,7 +3991,7 @@ itself

    If no ServerName is specified, then the server attempts to deduce the client visible hostname by performing a reverse lookup on an IP address of the systems hostname.

    - +

    If no port is specified in the ServerName, then the server will use the port from the incoming request. For optimal reliability and @@ -4023,7 +4075,9 @@ is accessed by an incompatible browser module="mod_so">LoadModule, for example) are taken as relative to this directory.

    - ServerRoot "/home/httpd" + +ServerRoot "/home/httpd" +

    The default location of ServerRoot may be modified by using the --prefix argument to @@ -4162,7 +4216,9 @@ handler of extension, you might put the following into an .htaccess file in that directory:

    - SetHandler imap-file + +SetHandler imap-file +

    Another example: if you wanted to have the server display a status report whenever a URL of @@ -4278,7 +4334,7 @@ certain events before failing a request for an acknowledgement of a packet if the send buffer is full.

  • -
  • In mod_cgi and mod_cgid, +
  • In mod_cgi and mod_cgid, the length of time to wait for output from a CGI script.
  • In mod_ext_filter, the length of time to @@ -4625,8 +4681,8 @@ for external processing, e.g. to a CGI script.

    This directive controls whether HTTP trailers are copied into the - internal representation of HTTP headers. This mergeing occurs when the - request body has been completely consumed, long after most header + internal representation of HTTP headers. This mergeing occurs when the + request body has been completely consumed, long after most header processing would have a chance to examine or modify request headers.

    This option is provided for compatibility with releases prior to 2.4.10, where trailers were always merged.

    diff --git a/docs/manual/mod/mod_asis.xml b/docs/manual/mod/mod_asis.xml index d42f8da662..e33e8e84be 100644 --- a/docs/manual/mod/mod_asis.xml +++ b/docs/manual/mod/mod_asis.xml @@ -51,7 +51,9 @@ HTTP headers

    In the server configuration file, associate files with the send-as-is handler e.g.

    - AddHandler send-as-is asis + +AddHandler send-as-is asis +

    The contents of any file with a .asis extension will then be sent by Apache httpd to the client with almost no diff --git a/docs/manual/mod/mod_authnz_ldap.xml b/docs/manual/mod/mod_authnz_ldap.xml index 542094b5f6..37a3e131c6 100644 --- a/docs/manual/mod/mod_authnz_ldap.xml +++ b/docs/manual/mod/mod_authnz_ldap.xml @@ -566,7 +566,8 @@ Require valid-user The next example is the same as above; but with the fields that have useful defaults omitted. Also, note the use of a redundant LDAP server. -AuthLDAPURL "ldap://ldap1.example.com ldap2.example.com/ou=People, o=Example" + +AuthLDAPURL "ldap://ldap1.example.com ldap2.example.com/ou=People, o=Example" Require valid-user

  • @@ -926,8 +927,12 @@ to perform a DN lookup AuthLDAPBindDN.

    - AuthLDAPInitialBindPattern (.+) $1@example.com - AuthLDAPInitialBindPattern (.+) cn=$1,dc=example,dc=com + +AuthLDAPInitialBindPattern (.+) $1@example.com + + +AuthLDAPInitialBindPattern (.+) cn=$1,dc=example,dc=com + Not available with authorization-only This directive can only be used if this module authenticates the user, and @@ -1157,8 +1162,8 @@ evaluated before the user search is discontinued. Nested groups performance

    When AuthLDAPSubGroupAttribute overlaps with AuthLDAPGroupAttribute (as it does by default and - as required by common LDAP schemas), uncached searching for subgroups in - large groups can be very slow. If you use large, non-nested groups, keep + as required by common LDAP schemas), uncached searching for subgroups in + large groups can be very slow. If you use large, non-nested groups, keep AuthLDAPMaxSubGroupDepth set to zero.

    @@ -1186,7 +1191,7 @@ query to set the REMOTE_USER environment variable directive is useful should you want people to log into a website using an email address, but a backend application expects the username as a userid.

    -

    This directive only has effect when this module is used for +

    This directive only has effect when this module is used for authentication.

    @@ -1307,7 +1312,9 @@ objects that are groups during sub-group processing. to use. The syntax of the URL is

    ldap://host:port/basedn?attribute?scope?filter

    If you want to specify more than one LDAP URL that Apache should try in turn, the syntax is:

    -AuthLDAPUrl "ldap://ldap1.example.com ldap2.example.com/dc=..." + +AuthLDAPUrl "ldap://ldap1.example.com ldap2.example.com/dc=..." +

    Caveat: If you specify multiple servers, you need to enclose the entire URL string in quotes; otherwise you will get an error: "AuthLDAPURL takes one argument, URL to define LDAP connection.." You can of course use search parameters on each of these.

    diff --git a/docs/manual/mod/mod_cern_meta.xml b/docs/manual/mod/mod_cern_meta.xml index ce40d7b4eb..694b3c3115 100644 --- a/docs/manual/mod/mod_cern_meta.xml +++ b/docs/manual/mod/mod_cern_meta.xml @@ -81,12 +81,16 @@ files accessed. Set to "." to look in the same directory as the file:

    - MetaDir . + +MetaDir . +

    Or, to set it to a subdirectory of the directory containing the files:

    - MetaDir .meta + +MetaDir .meta + diff --git a/docs/manual/mod/mod_filter.xml b/docs/manual/mod/mod_filter.xml index 660fb67802..2f4a4188a5 100644 --- a/docs/manual/mod/mod_filter.xml +++ b/docs/manual/mod/mod_filter.xml @@ -404,10 +404,10 @@ for a complete reference and examples. With two arguments it applies to a filter-name whenever the filter runs any provider.

    -

    Flags specified with this directive are merged with the flags - that underlying providers may have registerd with +

    Flags specified with this directive are merged with the flags + that underlying providers may have registerd with mod_filter. For example, a filter may internally specify - the equivalent of change=yes, but a particular + the equivalent of change=yes, but a particular configuration of the module can override with change=no.

    @@ -415,7 +415,7 @@ for a complete reference and examples.
    change=yes|no
    -
    Specifies whether the filter changes the content, including possibly +
    Specifies whether the filter changes the content, including possibly the content length. The "no" argument is supported in 2.4.7 and later.
    change=1:1
    @@ -474,4 +474,3 @@ for a complete reference and examples. - diff --git a/docs/manual/mod/mod_imagemap.xml b/docs/manual/mod/mod_imagemap.xml index 1620af4640..6a4e50f9aa 100644 --- a/docs/manual/mod/mod_imagemap.xml +++ b/docs/manual/mod/mod_imagemap.xml @@ -40,11 +40,15 @@

    The following directive will activate files ending with .map as imagemap files:

    - AddHandler imap-file map + +AddHandler imap-file map +

    Note that the following is still supported:

    - AddType application/x-httpd-imap map + +AddType application/x-httpd-imap map +

    However, we are trying to phase out "magic MIME types" so we are deprecating this method.

    diff --git a/docs/manual/mod/mod_journald.xml b/docs/manual/mod/mod_journald.xml index e15da1db71..7133cae9da 100644 --- a/docs/manual/mod/mod_journald.xml +++ b/docs/manual/mod/mod_journald.xml @@ -75,7 +75,9 @@ if the system supports it.

    - ErrorLog journald + +ErrorLog journald + diff --git a/docs/manual/mod/mod_mime.xml b/docs/manual/mod/mod_mime.xml index e6c913e0ec..522321376a 100644 --- a/docs/manual/mod/mod_mime.xml +++ b/docs/manual/mod/mod_mime.xml @@ -192,7 +192,9 @@ module="mod_mime_magic">MimeMagicFile resource, in order to tell the client browser about the encoding method.

    - Content-encoding: pkzip + +Content-encoding: pkzip +
    Character sets and languages @@ -364,7 +366,7 @@ handler might use:

    - AddHandler cgi-script .cgi +AddHandler cgi-script .cgi

    Once that has been put into your httpd.conf file, any file containing @@ -497,7 +499,7 @@ responses from the server compress the output using mod_deflate.

    - AddOutputFilter INCLUDES;DEFLATE shtml +AddOutputFilter INCLUDES;DEFLATE shtml

    If more than one filter is specified, they must be separated @@ -568,16 +570,16 @@ type Example - AddType image/gif .gif - +AddType image/gif .gif +

    Or, to specify multiple file extensions in one directive:

    Example - AddType image/jpeg jpeg jpg jpe - +AddType image/jpeg jpeg jpg jpe +

    The extension argument is case-insensitive and can @@ -593,8 +595,8 @@ type Example - AddType application/rss+xml;qs=0.8 .xml - +AddType application/rss+xml;qs=0.8 .xml +

    This is useful in situations, e.g. when a client @@ -658,7 +660,7 @@ a matching file with MultiViews files:

    - MultiviewsMatch Handlers Filters +MultiviewsMatch Handlers Filters

    MultiviewsMatch is not allowed in a @@ -700,8 +702,8 @@ assigned a language-tag by some other means. Example - DefaultLanguage en - +DefaultLanguage en + mod_negotiation @@ -726,8 +728,8 @@ components as part of the filename Example - ModMimeUsePathInfo On - +ModMimeUsePathInfo On +

    If you have a request for /index.php/foo.shtml @@ -765,8 +767,8 @@ extensions Example - RemoveCharset .html .shtml - +RemoveCharset .html .shtml + @@ -833,14 +835,14 @@ extensions /foo/.htaccess: - AddHandler server-parsed .html - +AddHandler server-parsed .html + /foo/bar/.htaccess: - RemoveHandler .html - +RemoveHandler .html +

    This has the effect of returning .html files in @@ -923,8 +925,8 @@ extensions Example - RemoveOutputFilter shtml - +RemoveOutputFilter shtml + AddOutputFilter @@ -950,8 +952,8 @@ extensions /foo/.htaccess: - RemoveType .cgi - +RemoveType .cgi +

    This will remove any special handling of .cgi diff --git a/docs/manual/mod/mod_proxy.xml b/docs/manual/mod/mod_proxy.xml index 7a7596f798..7e97e9c358 100644 --- a/docs/manual/mod/mod_proxy.xml +++ b/docs/manual/mod/mod_proxy.xml @@ -451,7 +451,7 @@ ProxyPass "/examples" "http://backend.example.com/examples" timeout=10 other request headers.

    Note: If you need to specify custom request headers to be - added to the forwarded request, use the + added to the forwarded request, use the RequestHeader directive.

    @@ -484,7 +484,7 @@ ProxyPass "/examples" "http://backend.example.com/examples" timeout=10 directory of example.com through the INCLUDES filter when they are sent through the proxy server:

    - + <Proxy http://example.com/foo/*> SetOutputFilter INCLUDES </Proxy> @@ -503,14 +503,14 @@ ProxyPass "/examples" "http://backend.example.com/examples" timeout=10 Differences from the Location configuration section -

    A backend URL matches the configuration section if it begins with the +

    A backend URL matches the configuration section if it begins with the the wildcard-url string, even if the last path segment in the - directive only matches a prefix of the backend URL. For example, - <Proxy http://example.com/foo> matches all of - http://example.com/foo, http://example.com/foo/bar, and + directive only matches a prefix of the backend URL. For example, + <Proxy http://example.com/foo> 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 Location section, which for purposes of this note + >Location section, which for purposes of this note treats the final path component as if it ended in a slash.

    For more control over the matching, see ProxyMatch.

    @@ -860,7 +860,7 @@ expressions a local virtual path; url is a partial URL for the remote server and cannot include a query string.

    - Note: This directive cannot be used within a + Note: This directive cannot be used within a <Directory> context. The stickysessionsep "." Sets the separation symbol in the session cookie. Some backend application servers - do not use the '.' as the symbol. For example the Oracle Weblogic server uses + do not use the '.' as the symbol. For example the Oracle Weblogic server uses '!'. The correct symbol can be set using this option. The setting of 'Off' signifies that no symbol is used. @@ -1359,9 +1359,9 @@ ProxyPassReverse "/mirror/foo/" "https://backend.example.com/" matches, the server will substitute any parenthesized matches into the given string and use it as a new url.

    - Note: This directive cannot be used within a + Note: This directive cannot be used within a <Directory> context. - +

    Suppose the local server has address http://example.com/; then

    @@ -1533,7 +1533,7 @@ reverse proxy. This directive rewrites the path string in internal-path, the cookie path will be replaced with public-path.

    -In the example given with +In the example given with ProxyPassReverse, the directive:

    diff --git a/docs/manual/mod/mod_proxy_ftp.xml b/docs/manual/mod/mod_proxy_ftp.xml index aef0af7dd1..a2a56107bf 100644 --- a/docs/manual/mod/mod_proxy_ftp.xml +++ b/docs/manual/mod/mod_proxy_ftp.xml @@ -59,7 +59,9 @@

    Alternatively you may prefer to default everything to binary:

    - ForceType application/octet-stream + +ForceType application/octet-stream +
    diff --git a/docs/manual/mod/mod_so.xml b/docs/manual/mod/mod_so.xml index a79abb94f4..891422b2ca 100644 --- a/docs/manual/mod/mod_so.xml +++ b/docs/manual/mod/mod_so.xml @@ -145,7 +145,9 @@ Windows

    For example:

    - LoadFile libexec/libxmlparse.so + +LoadFile "libexec/libxmlparse.so" + @@ -170,7 +172,7 @@ of active modules in the module documentation. Example:

    - LoadModule status_module modules/mod_status.so +LoadModule status_module "modules/mod_status.so"

    loads the named module from the modules subdirectory of the @@ -179,4 +181,3 @@ of active modules - diff --git a/docs/manual/mod/mod_syslog.xml b/docs/manual/mod/mod_syslog.xml index 169e326724..183889d4ff 100644 --- a/docs/manual/mod/mod_syslog.xml +++ b/docs/manual/mod/mod_syslog.xml @@ -46,7 +46,9 @@ in individual virtual hosts, the final facility specified affects the entire server.

    - ErrorLog syslog:user + +ErrorLog syslog:user + diff --git a/docs/manual/mod/mod_xml2enc.xml b/docs/manual/mod/mod_xml2enc.xml index 1d4f23c6f4..75804c5896 100644 --- a/docs/manual/mod/mod_xml2enc.xml +++ b/docs/manual/mod/mod_xml2enc.xml @@ -132,7 +132,9 @@ module for earlier versions. information, you can set this default to help mod_xml2enc process the data correctly. For example, to work with the default value of Latin1 (iso-8859-1 specified in HTTP/1.0, use

    - xml2EncDefault iso-8859-1 + +xml2EncDefault iso-8859-1 + diff --git a/docs/manual/rewrite/flags.xml b/docs/manual/rewrite/flags.xml index 18a65329c1..b12cad3d3b 100644 --- a/docs/manual/rewrite/flags.xml +++ b/docs/manual/rewrite/flags.xml @@ -46,10 +46,12 @@ providing detailed explanations and examples.

    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.

    -RewriteRule pattern target [Flag1,Flag2,Flag3] + +RewriteRule pattern target [Flag1,Flag2,Flag3] +

    Each flag (with a few exceptions) has a short form, such as -CO, as well as a longer form, such as cookie. +CO, as well as a longer form, such as cookie. While it is most common to use the short form, it is recommended that you familiarize yourself with the long form, so that you remember what each flag is supposed to do. @@ -68,9 +70,9 @@ of how you might use them.

    The [B] flag instructs RewriteRule to escape non-alphanumeric characters before applying the transformation.

    -

    In 2.4.10 and later, you can limit the escaping to specific characters -in backreferences by listing them: [B=#?;]. Note: The space -character can be used in the list of characters to escape, but it cannot be +

    In 2.4.10 and later, you can limit the escaping to specific characters +in backreferences by listing them: [B=#?;]. Note: The space +character can be used in the list of characters to escape, but it cannot be the last character in the list.

    mod_rewrite has to unescape URLs before mapping them, @@ -78,7 +80,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:

    -RewriteRule ^search/(.*)$ /search.php?term=$1 + +RewriteRule ^search/(.*)$ /search.php?term=$1 +

    Given a search term of 'x & 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 @@ -106,7 +110,7 @@ strings in the encoded form.

    BNP|backrefnoplus (don't escape space to +)

    The [BNP] flag instructs RewriteRule to escape the space character -in a backreference to %20 rather than '+'. Useful when the backreference +in a backreference to %20 rather than '+'. Useful when the backreference will be used in the path component rather than the query string.

    @@ -272,7 +276,7 @@ module="mod_setenvif">SetEnvIf. This technique is offered as an example, not as a recommendation.

    -
    END +
    END

    Using the [END] flag terminates not only the current round of rewrite processing (like [L]) but also prevents any subsequent rewrite processing from occurring in per-directory (htaccess) context.

    @@ -290,7 +294,9 @@ allows more flexibility in assigning a Forbidden status.

    The following rule will forbid .exe files from being downloaded from your server.

    -RewriteRule \.exe - [F] + +RewriteRule \.exe - [F] +

    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 @@ -309,7 +315,9 @@ longer available.

    As with the [F] flag, you will typically use the "-" syntax for the rewrite target when using the [G] flag:

    -RewriteRule oldproduct - [G,NC] + +RewriteRule oldproduct - [G,NC] +

    When using [G], an [L] is implied - that is, the response is returned immediately, and no further rules are evaluated.

    @@ -321,7 +329,9 @@ immediately, and no further rules are evaluated.

    handler. For example, one might use this to force all files without a file extension to be parsed by the php handler:

    -RewriteRule !\. - [H=application/x-httpd-php] + +RewriteRule !\. - [H=application/x-httpd-php] +

    The regular expression above - !\. - will match any request @@ -405,14 +415,16 @@ 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.

    -RewriteRule (.*)A(.*) $1B$2 [N] + +RewriteRule (.*)A(.*) $1B$2 [N] +

    You can think of this as a while loop: While this pattern still matches (i.e., while the URI still contains an A), perform this substitution (i.e., replace the A with a B).

    In 2.5.0 and later, this module returns an error after 10,000 iterations to -protect against unintended looping. An alternative maximum number of +protect against unintended looping. An alternative maximum number of iterations can be specified by adding to the N flag.

    # Be willing to replace 1 character in each pass of the loop @@ -434,7 +446,9 @@ to your dedicated image server. The match is case-insensitive, so that .jpg and .JPG files are both acceptable, for example.

    -RewriteRule (.*\.(jpg|gif|png))$ http://images.example.com$1 [P,NC] + +RewriteRule (.*\.(jpg|gif|png))$ http://images.example.com$1 [P,NC] +
    NE|noescape @@ -443,7 +457,9 @@ example.

    equivalent. Using the [NE] flag prevents that from happening.

    -RewriteRule ^/anchor/(.+) /bigpage.html#$1 [NE,R] + +RewriteRule ^/anchor/(.+) /bigpage.html#$1 [NE,R] +

    The above example will redirect /anchor/xyz to @@ -484,7 +500,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:

    -RewriteRule /(.*)\.(jpg|gif|png)$ http://images.example.com/$1.$2 [P] + +RewriteRule /(.*)\.(jpg|gif|png)$ http://images.example.com/$1.$2 [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 @@ -578,7 +596,9 @@ Using the [QSA] flag causes the query strings to be combined.

    Consider the following rule:

    -RewriteRule /pages/(.+) /page.php?page=$1 [QSA] + +RewriteRule /pages/(.+) /page.php?page=$1 [QSA] +

    With the [QSA] flag, a request for /pages/123?one=two will be mapped to /page.php?page=123&one=two. Without the [QSA] @@ -625,7 +645,7 @@ will be used to generate the URL sent with the redirect. Any valid HTTP response status code may be specified, using the syntax [R=305], with a 302 status code being used by default if none is specified. The status code specified need not -necessarily be a redirect (3xx) status code. However, +necessarily be a redirect (3xx) status code. However, if a status code is outside the redirect range (300-399) then the substitution string is dropped entirely, and rewriting is stopped as if the L were used.

    @@ -645,14 +665,14 @@ URI in request' warnings.
    S|skip -

    The [S] flag is used to skip rules that you don't want to run. The -syntax of the skip flag is [S=N], where N signifies +

    The [S] flag is used to skip rules that you don't want to run. The +syntax of the skip flag is [S=N], where N signifies the number of rules to skip (provided the RewriteRule and any preceding -RewriteCond directives match). This can be thought of as a -goto statement in your rewrite ruleset. In the following +RewriteCond directives match). This can be thought of as a +goto statement in your rewrite ruleset. In the following example, we only want to run the -RewriteRule if the requested URI doesn't correspond with an +RewriteRule if the requested URI doesn't correspond with an actual file.

    @@ -738,4 +758,3 @@ The L flag can be useful in this context to end the
    - diff --git a/docs/manual/rewrite/remapping.xml b/docs/manual/rewrite/remapping.xml index e1e67b213c..d392472a1b 100644 --- a/docs/manual/rewrite/remapping.xml +++ b/docs/manual/rewrite/remapping.xml @@ -477,7 +477,9 @@ com http://www.example.com/
    we replace /puppies and /canines by the canonical /dogs.

    -RewriteRule ^/(puppies|canines)/(.*) /dogs/$2 [R] + +RewriteRule ^/(puppies|canines)/(.*) /dogs/$2 [R] +
    Discussion:
    @@ -605,7 +607,7 @@ of the URL.

    Many of the solutions in this section will all use the same condition, which leaves the matched value in the %2 backreference. %1 is the beginining of the query string (up to the key of intererest), and %3 is the remainder. This -condition is a bit complex for flexibility and to avoid double '&&' in the +condition is a bit complex for flexibility and to avoid double '&&' in the substitutions.

    • This solution removes the matching key and value: @@ -632,7 +634,7 @@ RewriteRule (.*) $1/products/%2/? [PT] # Capture the value of mykey in the query string RewriteCond %{QUERY_STRING} (.*(?:^|&))mykey=([^&]*)&?(.*)&?$ -RewriteCond %2 !=not-so-secret-value +RewriteCond %2 !=not-so-secret-value RewriteRule (.*) - [F]
    • @@ -640,7 +642,7 @@ RewriteRule (.*) - [F]
    • This solution shows the reverse of the previous ones, copying path components (perhaps PATH_INFO) from the URL into the query string. -# The desired URL might be /products/kitchen-sink, and the script expects +# The desired URL might be /products/kitchen-sink, and the script expects # /path?products=kitchen-sink. RewriteRule ^/?path/([^/]+)/([^/]+) /path?$1=$2 [PT] diff --git a/docs/manual/rewrite/rewritemap.xml b/docs/manual/rewrite/rewritemap.xml index 9b4dc93197..0b33e52690 100644 --- a/docs/manual/rewrite/rewritemap.xml +++ b/docs/manual/rewrite/rewritemap.xml @@ -60,7 +60,9 @@ configuration.

      The syntax of the RewriteMap directive is as follows:

      -RewriteMap MapName MapType:MapSource + +RewriteMap MapName MapType:MapSource +

      The MapName is an arbitray name that you assign to the map, and which you will use in @@ -84,15 +86,21 @@ configuration.

      For example, you can define a RewriteMap as:

      - RewriteMap examplemap txt:/path/to/file/map.txt + +RewriteMap examplemap txt:/path/to/file/map.txt +

      You would then be able to use this map in a RewriteRule as follows:

      -RewriteRule ^/ex/(.*) ${examplemap:$1} + +RewriteRule ^/ex/(.*) ${examplemap:$1} +

      A default value can be specified in the event that nothing is found in the map:

      -RewriteRule ^/ex/(.*) ${examplemap:$1|/not_found.html} + +RewriteRule ^/ex/(.*) ${examplemap:$1|/not_found.html} + Per-directory and .htaccess context

      @@ -139,7 +147,6 @@ may be used, and give examples of each.

      Redirect a URI to an all-lowercase version of itself

      - RewriteMap lc int:tolower RewriteRule (.*?[A-Z]+.*) ${lc:$1} [R] @@ -211,7 +218,9 @@ telephone 328 scope. If you're planning to use this in a .htaccess file, you'll need to remove the leading slash from the rewrite pattern in order for it to match anything: - RewriteRule ^product/(.*) /prods.php?id=${product2id:$1|NOTFOUND} [PT] + +RewriteRule ^product/(.*) /prods.php?id=${product2id:$1|NOTFOUND} [PT] +
      Cached lookups @@ -362,10 +371,9 @@ by many requests.

      A simple example is shown here which will replace all dashes with underscores in a request URI.

      - +

      Rewrite configuration

      - RewriteMap d2u prg:/www/bin/dash2under.pl apache:apache
      RewriteRule - ${d2u:%{REQUEST_URI}}
      -- 2.40.0