X-Git-Url: https://granicus.if.org/sourcecode?a=blobdiff_plain;f=docs%2Fmanual%2Fmod%2Fmod_rewrite.html.en;h=e310b299f886c0ed93d159f2298675fadf3039bb;hb=d4f82636073731f93c93eee1de7fa8d394bd539e;hp=c4cf75977e498066ea8c40226fe2e0fc369ac8f7;hpb=c04bbf3c9b99a26d6c81b2972246d54a0c942f0e;p=apache diff --git a/docs/manual/mod/mod_rewrite.html.en b/docs/manual/mod/mod_rewrite.html.en index c4cf75977e..e310b299f8 100644 --- a/docs/manual/mod/mod_rewrite.html.en +++ b/docs/manual/mod/mod_rewrite.html.en @@ -5,7 +5,7 @@ This file is generated from xml source: DO NOT EDIT XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --> -mod_rewrite - Apache HTTP Server +mod_rewrite - Apache HTTP Server Version 2.5 @@ -209,27 +209,30 @@ Alias /myapp /opt/myapp-1.2.3 - HTTP_USER_AGENT
- HTTP_REFERER
+ HTTP_ACCEPT
HTTP_COOKIE
HTTP_FORWARDED
HTTP_HOST
HTTP_PROXY_CONNECTION
- HTTP_ACCEPT
+ HTTP_REFERER
+ HTTP_USER_AGENT
- REMOTE_ADDR
+ AUTH_TYPE
CONN_REMOTE_ADDR
+ CONTEXT_PREFIX
+ CONTEXT_DOCUMENT_ROOT
+ IPV6
+ PATH_INFO
+ QUERY_STRING
+ REMOTE_ADDR
REMOTE_HOST
+ REMOTE_IDENT
REMOTE_PORT
REMOTE_USER
- REMOTE_IDENT
REQUEST_METHOD
SCRIPT_FILENAME
- PATH_INFO
- QUERY_STRING
- AUTH_TYPE
@@ -242,9 +245,11 @@ Alias /myapp /opt/myapp-1.2.3 DOCUMENT_ROOT
+ SCRIPT_GROUP
+ SCRIPT_USER
+ SERVER_ADDR
SERVER_ADMIN
SERVER_NAME
- SERVER_ADDR
SERVER_PORT
SERVER_PROTOCOL
SERVER_SOFTWARE
@@ -263,14 +268,14 @@ Alias /myapp /opt/myapp-1.2.3 API_VERSION
- THE_REQUEST
- REQUEST_URI
- REQUEST_FILENAME
- IS_SUBREQ
+ CONN_REMOTE_ADDR
HTTPS
- REQUEST_SCHEME
+ IS_SUBREQ
REMOTE_ADDR
- CONN_REMOTE_ADDR
+ REQUEST_FILENAME
+ REQUEST_SCHEME
+ REQUEST_URI
+ THE_REQUEST
@@ -279,8 +284,8 @@ Alias /myapp /opt/myapp-1.2.3 correspond to the similarly named HTTP MIME-headers, C variables of the Apache HTTP Server or struct tm fields of the Unix system. - Most are documented elsewhere in the Manual or in - the CGI specification.

+ Most are documented here + or elsewhere in the Manual or in the CGI specification.

SERVER_NAME and SERVER_PORT depend on the values of UseCanonicalName and @@ -290,14 +295,6 @@ Alias /myapp /opt/myapp-1.2.3

Those that are special to mod_rewrite include those below.

-
IS_SUBREQ
- -
Will contain the text "true" if the request - currently being processed is a sub-request, - "false" otherwise. Sub-requests may be generated - by modules that need to resolve additional files - or URIs in order to complete their tasks.
-
API_VERSION
This is the version of the Apache httpd module API @@ -309,21 +306,30 @@ Alias /myapp /opt/myapp-1.2.3 instance, it is 19990320:10), but is mainly of interest to module authors.
-
THE_REQUEST
+
CONN_REMOTE_ADDR
-
The full HTTP request line sent by the - browser to the server (e.g., "GET - /index.html HTTP/1.1"). This does not - include any additional headers sent by the - browser. This value has not been unescaped - (decoded), unlike most other variables below.
+
Since 2.4.8: The peer IP address of the connection (see the + mod_remoteip module).
-
REQUEST_URI
+
HTTPS
-
The path component of the requested URI, - such as "/index.html". This notably excludes the - query string which is available as as its own variable - named QUERY_STRING.
+
Will contain the text "on" if the connection is + using SSL/TLS, or "off" otherwise. (This variable + can be safely used regardless of whether or not + mod_ssl is loaded).
+ +
IS_SUBREQ
+ +
Will contain the text "true" if the request + currently being processed is a sub-request, + "false" otherwise. Sub-requests may be generated + by modules that need to resolve additional files + or URIs in order to complete their tasks.
+ +
REMOTE_ADDR
+ +
The IP address of the remote host (see the + mod_remoteip module).
REQUEST_FILENAME
@@ -338,26 +344,27 @@ Alias /myapp /opt/myapp-1.2.3 REQUEST_URI to map the request to a file. -
HTTPS
- -
Will contain the text "on" if the connection is - using SSL/TLS, or "off" otherwise. (This variable - can be safely used regardless of whether or not - mod_ssl is loaded).
-
REQUEST_SCHEME
Will contain the scheme of the request (usually "http" or "https"). This value can be influenced with ServerName.
-
REMOTE_ADDR
-
The IP address of the remote host (see the - mod_remoteip module).
+
REQUEST_URI
-
CONN_REMOTE_ADDR
-
Since 2.4.8: The peer IP address of the connection (see the - mod_remoteip module).
+
The path component of the requested URI, + such as "/index.html". This notably excludes the + query string which is available as as its own variable + named QUERY_STRING.
+ +
THE_REQUEST
+ +
The full HTTP request line sent by the + browser to the server (e.g., "GET + /index.html HTTP/1.1"). This does not + include any additional headers sent by the + browser. This value has not been unescaped + (decoded), unlike most other variables below.
@@ -418,7 +425,7 @@ Alias /myapp /opt/myapp-1.2.3 the value of the HTTP header ``Proxy-Connection:''.

If a HTTP header is used in a condition this header is added to - the Vary header of the response in case the condition evaluates to + the Vary header of the response in case the condition evaluates to true for the request. It is not added if the condition evaluates to false for the request. Adding the HTTP header to the Vary header of the response is needed for proper caching.

@@ -729,7 +736,7 @@ RewriteRule ^/$ /homepage.std.html [L] all. It does not even update the SCRIPT_URx environment variables.

-

Use this directive to disable rules in a particular contact, +

Use this directive to disable rules in a particular context, rather than commenting out all the RewriteRule directives.

Note that rewrite configurations are not @@ -1169,136 +1176,134 @@ cannot use $N in the substitution string! brackets, of any of the flags in the following table. More details, and examples, for each flag, are available in the Rewrite Flags document.

- - +
Flag and syntax
- + - + - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + -
Flag and syntax Function
B Escape non-alphanumeric characters in backreferences before applying the transformation. details ...
backrefnoplus|BNP If backreferences are being escaped, spaces should be escaped to %20 instead of +. Useful when the backreference will be used in the path component rather than the query string.details ...
chain|C Rule is chained to the following rule. If the rule fails, the rule(s) chained to it will be skipped. details ...
cookie|CO=NAME:VAL Sets a cookie in the client browser. Full syntax is: CO=NAME:VAL:domain[:lifetime[:path[:secure[:httponly]]]] details ...
discardpath|DPI Causes the PATH_INFO portion of the rewritten URI to be discarded. details ...
END Stop the rewriting process immediately and don't apply any more rules. Also prevents further execution of rewrite rules in per-directory and .htaccess context. (Available in 2.3.9 and later) details ...
env|E=[!]VAR[:VAL] Causes an environment variable VAR to be set (to the value VAL if provided). The form !VAR causes the environment variable VAR to be unset. details ...
forbidden|F Returns a 403 FORBIDDEN response to the client browser. details ...
gone|G Returns a 410 GONE response to the client browser. details ...
Handler|H=Content-handler Causes the resulting URI to be sent to the specified Content-handler for processing. details ...
last|L Stop the rewriting process immediately and don't apply any more rules. Especially note caveats for per-directory and .htaccess context (see also the END flag). details ...
next|N Re-run the rewriting process, starting again with the first rule, using the result of the ruleset so far as a starting point. details ...
nocase|NC Makes the pattern comparison case-insensitive. details ...
noescape|NE Prevent mod_rewrite from applying hexcode escaping of special characters in the result of the rewrite. details ...
nosubreq|NS Causes a rule to be skipped if the current request is an internal sub-request. details ...
proxy|P Force the substitution URL to be internally sent as a proxy request. details ...
passthrough|PT Forces the resulting URI to be passed back to the URL mapping engine for processing of other URI-to-filename translators, such as Alias or Redirect. details ...
qsappend|QSA Appends any query string from the original request URL to any query string created in the rewrite target.details ...
qsdiscard|QSD Discard any query string attached to the incoming URI. details ...
redirect|R[=code] Forces an external redirect, optionally with the specified HTTP status code. details ...
skip|S=num Tells the rewriting engine to skip the next num rules if the current rule matches. details ...
type|T=MIME-type Force the MIME-type of the target file to be the specified type. details ...
+

Home directory expansion

When the substitution string begins with a string @@ -1321,68 +1326,55 @@ directive.

/somepath/pathinfo'':

- - +
- - - + - - - + - - - + - - - + - - - + - - - + @@ -1396,74 +1388,59 @@ directive.

/somepath/localpath/pathinfo'':

-
Given Rule Resulting Substitution
^/somepath(.*) otherpath$1 invalid, not supported
^/somepath(.*) otherpath$1 [R] invalid, not supported
^/somepath(.*) otherpath$1 [P] invalid, not supported
^/somepath(.*) /otherpath$1 /otherpath/pathinfo
^/somepath(.*) /otherpath$1 [R] http://thishost/otherpath/pathinfo via external redirection
^/somepath(.*) /otherpath$1 [P] doesn't make sense, not supported
^/somepath(.*) http://thishost/otherpath$1 /otherpath/pathinfo
^/somepath(.*) http://thishost/otherpath$1 [R] http://thishost/otherpath/pathinfo via external redirection
^/somepath(.*) http://thishost/otherpath$1 [P] doesn't make sense, not supported
^/somepath(.*) http://otherhost/otherpath$1 http://otherhost/otherpath/pathinfo via external redirection
^/somepath(.*) http://otherhost/otherpath$1 [R] http://otherhost/otherpath/pathinfo via external redirection (the [R] flag is redundant)
^/somepath(.*) http://otherhost/otherpath$1 [P] http://otherhost/otherpath/pathinfo via internal proxy
- - +
- - - + - - - + - - - + - - - + - - - + - - - + -
Given Rule Resulting Substitution
^localpath(.*) otherpath$1 /somepath/otherpath/pathinfo
^localpath(.*) otherpath$1 [R] http://thishost/somepath/otherpath/pathinfo via external redirection
^localpath(.*) otherpath$1 [P] doesn't make sense, not supported
^localpath(.*) /otherpath$1 /otherpath/pathinfo
^localpath(.*) /otherpath$1 [R] http://thishost/otherpath/pathinfo via external redirection
^localpath(.*) /otherpath$1 [P] doesn't make sense, not supported
^localpath(.*) http://thishost/otherpath$1 /otherpath/pathinfo
^localpath(.*) http://thishost/otherpath$1 [R] http://thishost/otherpath/pathinfo via external redirection
^localpath(.*) http://thishost/otherpath$1 [P] doesn't make sense, not supported
^localpath(.*) http://otherhost/otherpath$1 http://otherhost/otherpath/pathinfo via external redirection
^localpath(.*) http://otherhost/otherpath$1 [R] http://otherhost/otherpath/pathinfo via external redirection (the [R] flag is redundant)
^localpath(.*) http://otherhost/otherpath$1 [P] http://otherhost/otherpath/pathinfo via internal proxy