From: Rich Bowen Date: Mon, 13 Aug 2007 00:35:50 +0000 (+0000) Subject: Correct two syntactical errors in examples given for the flags - CO and X-Git-Tag: 2.3.0~1612 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cefab4660c0f0c5590b5fcc8ff0c7dfa549903ab;p=apache Correct two syntactical errors in examples given for the flags - CO and H, specifically. Also adds an example for the [NE] flag. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@565212 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/rewrite/flags.html.en b/docs/manual/rewrite/flags.html.en index 366987357c..3779cee9ab 100644 --- a/docs/manual/rewrite/flags.html.en +++ b/docs/manual/rewrite/flags.html.en @@ -81,7 +81,7 @@ is, the entire website.

RewriteEngine On
-RewriteRule ^/index.html - [CO=frontdoor=yes:.apache.org:1440:/] +RewriteRule ^/index.html - [CO=frontdoor:yes:.apache.org:1440:/]

This rule doesn't rewrite the request (the "-" rewrite target tells @@ -143,7 +143,7 @@ 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 .php] +RewriteRule !\. - [H=application/x-httpd-php]

@@ -182,6 +182,10 @@ rules.

The [N] flag causes the ruleset to start over again from the top. Use with extreme caution, as it may result in loop.

+

+The [Next] flag could be used, for example, if you wished to replace a +certain string or letter repeatedly in a request. +

@@ -201,7 +205,21 @@ RewriteRule (.*\.(jpg|gif|png))$ http://images.example.com$1 [P,NC]

NE|noescape

-

No escape flag

+

By default, special characters, such as & and +?, for example, will be converted to their hexcode +equivalent. Using the [NE] flag prevents that from happening. +

+ +

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

+ +

+The above example will redirect /anchor/xyz to +/bigpage.html#xyz. Omitting the [NE] will result in the # +being converted to its hexcode equivalent, %23. +

+

NS|nosubreq

diff --git a/docs/manual/rewrite/flags.xml b/docs/manual/rewrite/flags.xml index c9887a8103..c346b35f18 100644 --- a/docs/manual/rewrite/flags.xml +++ b/docs/manual/rewrite/flags.xml @@ -88,7 +88,7 @@ is, the entire website.

RewriteEngine On
-RewriteRule ^/index.html - [CO=frontdoor=yes:.apache.org:1440:/] +RewriteRule ^/index.html - [CO=frontdoor:yes:.apache.org:1440:/]

This rule doesn't rewrite the request (the "-" rewrite target tells @@ -151,7 +151,7 @@ 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 .php] +RewriteRule !\. - [H=application/x-httpd-php]

@@ -192,6 +192,10 @@ rules.

The [N] flag causes the ruleset to start over again from the top. Use with extreme caution, as it may result in loop.

+

+The [Next] flag could be used, for example, if you wished to replace a +certain string or letter repeatedly in a request. +

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

No escape flag

+

By default, special characters, such as & and +?, for example, will be converted to their hexcode +equivalent. Using the [NE] flag prevents that from happening. +

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

+The above example will redirect /anchor/xyz to +/bigpage.html#xyz. Omitting the [NE] will result in the # +being converted to its hexcode equivalent, %23. +

+
NS|nosubreq