From 259a5195a9dc23224b88f8e908a56a4e3b45fa14 Mon Sep 17 00:00:00 2001
From: Rich Bowen
chain|C
'
+ (chained with next rule).www
'' part inside a per-directory rule set
+ when you let an external redirect happen (where the
+ ``.www
'' part should not to occur!).redirect|R
- [=code]' (force redirect)http://thishost[:thisport]/
(which makes the
- new URL a URI) to force a external redirection. If no
- code is given a HTTP response of 302 (MOVED
- TEMPORARILY) is used. If you want to use other response
- codes in the range 300-400 just specify them as a number
- or use one of the following symbolic names:
- temp
(default), permanent
,
- seeother
. Use it for rules which should
- canonicalize the URL and give it back to the client,
- e.g., translate ``/~
'' into
- ``/u/
'' or always append a slash to
- /u/
user, etc.cookie|CO=
NAME:VAL:domain[:lifetime[:path]]'
+ (set cookie)Note: When you use this flag, make
- sure that the substitution field is a valid URL! If not,
- you are redirecting to an invalid location! And remember
- that this flag itself only prefixes the URL with
- http://thishost[:thisport]/
, rewriting
- continues. Usually you also want to stop and do the
- redirection immediately. To stop the rewriting you also
- have to provide the 'L' flag.
env|E=
VAR:VAL'
+ (set environment variable)$N
and
+ %N
which will be expanded. You can use this
+ flag more than once to set more than one variable. The
+ variables can be later dereferenced in many situations, but
+ usually from within XSSI (via <!--#echo
+ var="VAR"-->
) or CGI (e.g.
+ $ENV{'VAR'}
). Additionally you can dereference
+ it in a following RewriteCond pattern via
+ %{ENV:VAR}
. Use this to strip but remember
+ information from URLs.forbidden|F
' (force URL
to be forbidden)proxy|P
' (force
- proxy)http://
hostname) which can be
- handled by the Apache proxy module. If not you get an
- error from the proxy module. Use this flag to achieve a
- more powerful implementation of the ProxyPass directive,
- to map some remote stuff into the namespace of the local
- server.
-
- Notice: To use this functionality make sure you have
- the proxy module compiled into your Apache server
- program. If you don't know please check whether
- mod_proxy.c
is part of the ``httpd
- -l
'' output. If yes, this functionality is
- available to mod_rewrite. If not, then you first have to
- rebuild the httpd
program with mod_proxy
- enabled.
handler|H
=Content-handler'
+ (force Content handler)mod_alias
directive
+ ScriptAlias
which internally forces all files
+ inside the mapped directory to have a handler of
+ ``cgi-script
''.
last|L
'
(last rule)chain|C
'
- (chained with next rule).www
'' part inside a per-directory rule set
- when you let an external redirect happen (where the
- ``.www
'' part should not to occur!).nocase|NC
'
+ (no case)type|T
=MIME-type'
- (force MIME type).php
files to
- be displayed by mod_php
if they are called with
- the .phps
extension:
-
- RewriteRule ^(.+\.php)s$ $1 [T=application/x-httpd-php-source]
-
noescape|NE
'
+ (no URI escaping of
+ output)
+ RewriteRule /foo/(.*) /bar?arg=P1\%3d$1 [R,NE]
+
handler|H
=Content-handler'
- (force Content handler)mod_alias
directive
- ScriptAlias
which internally forces all files
- inside the mapped directory to have a handler of
- ``cgi-script
''./foo/zed
' into a safe
+ request for '/bar?arg=P1=zed
'.
+
nosubreq|NS
' (used only if
@@ -1531,38 +1516,29 @@ When using the NOT character
sub-requests. In these cases, use this flag.
nocase|NC
'
- (no case)qsappend|QSA
'
- (query string
- append)noescape|NE
'
- (no URI escaping of
- output)
- RewriteRule /foo/(.*) /bar?arg=P1\%3d$1 [R,NE]
-
proxy|P
' (force
+ proxy)http://
hostname) which can be
+ handled by the Apache proxy module. If not you get an
+ error from the proxy module. Use this flag to achieve a
+ more powerful implementation of the ProxyPass directive,
+ to map some remote stuff into the namespace of the local
+ server.
- which would turn '/foo/zed
' into a safe
- request for '/bar?arg=P1=zed
'.
+ Notice: To use this functionality make sure you have
+ the proxy module compiled into your Apache server
+ program. If you don't know please check whether
+ mod_proxy.c
is part of the ``httpd
+ -l
'' output. If yes, this functionality is
+ available to mod_rewrite. If not, then you first have to
+ rebuild the httpd
program with mod_proxy
+ enabled.
mod_rewrite
..
qsappend|QSA
'
+ (query string
+ append)redirect|R
+ [=code]' (force redirect)http://thishost[:thisport]/
(which makes the
+ new URL a URI) to force a external redirection. If no
+ code is given a HTTP response of 302 (MOVED
+ TEMPORARILY) is used. If you want to use other response
+ codes in the range 300-400 just specify them as a number
+ or use one of the following symbolic names:
+ temp
(default), permanent
,
+ seeother
. Use it for rules which should
+ canonicalize the URL and give it back to the client,
+ e.g., translate ``/~
'' into
+ ``/u/
'' or always append a slash to
+ /u/
user, etc.Note: When you use this flag, make
+ sure that the substitution field is a valid URL! If not,
+ you are redirecting to an invalid location! And remember
+ that this flag itself only prefixes the URL with
+ http://thishost[:thisport]/
, rewriting
+ continues. Usually you also want to stop and do the
+ redirection immediately. To stop the rewriting you also
+ have to provide the 'L' flag.
skip|S
=num'
(skip next rule(s))env|E=
VAR:VAL'
- (set environment variable)$N
and
- %N
which will be expanded. You can use this
- flag more than once to set more than one variable. The
- variables can be later dereferenced in many situations, but
- usually from within XSSI (via <!--#echo
- var="VAR"-->
) or CGI (e.g.
- $ENV{'VAR'}
). Additionally you can dereference
- it in a following RewriteCond pattern via
- %{ENV:VAR}
. Use this to strip but remember
- information from URLs.type|T
=MIME-type'
+ (force MIME type).php
files to
+ be displayed by mod_php
if they are called with
+ the .phps
extension:
+
+ RewriteRule ^(.+\.php)s$ $1 [T=application/x-httpd-php-source]
+
cookie|CO=
NAME:VAL:domain[:lifetime[:path]]'
- (set cookie)chain|C
'
+ (chained with next rule).www
'' part inside a per-directory rule set
+ when you let an external redirect happen (where the
+ ``.www
'' part should not to occur!).redirect|R
- [=code]' (force redirect)http://thishost[:thisport]/
(which makes the
- new URL a URI) to force a external redirection. If no
- code is given a HTTP response of 302 (MOVED
- TEMPORARILY) is used. If you want to use other response
- codes in the range 300-400 just specify them as a number
- or use one of the following symbolic names:
- temp
(default), permanent
,
- seeother
. Use it for rules which should
- canonicalize the URL and give it back to the client,
- e.g., translate ``/~
'' into
- ``/u/
'' or always append a slash to
- /u/
user, etc.cookie|CO=
NAME:VAL:domain[:lifetime[:path]]'
+ (set cookie)Note: When you use this flag, make
- sure that the substitution field is a valid URL! If not,
- you are redirecting to an invalid location! And remember
- that this flag itself only prefixes the URL with
- http://thishost[:thisport]/
, rewriting
- continues. Usually you also want to stop and do the
- redirection immediately. To stop the rewriting you also
- have to provide the 'L' flag.
env|E=
VAR:VAL'
+ (set environment variable)$N
and
+ %N
which will be expanded. You can use this
+ flag more than once to set more than one variable. The
+ variables can be later dereferenced in many situations, but
+ usually from within XSSI (via <!--#echo
+ var="VAR"-->
) or CGI (e.g.
+ $ENV{'VAR'}
). Additionally you can dereference
+ it in a following RewriteCond pattern via
+ %{ENV:VAR}
. Use this to strip but remember
+ information from URLs.forbidden|F
' (force URL
to be forbidden)proxy|P
' (force
- proxy)http://
hostname) which can be
- handled by the Apache proxy module. If not you get an
- error from the proxy module. Use this flag to achieve a
- more powerful implementation of the ProxyPass directive,
- to map some remote stuff into the namespace of the local
- server.
-
- Notice: To use this functionality make sure you have
- the proxy module compiled into your Apache server
- program. If you don't know please check whether
- mod_proxy.c
is part of the ``httpd
- -l
'' output. If yes, this functionality is
- available to mod_rewrite. If not, then you first have to
- rebuild the
handler|H
=Content-handler'
+ (force Content handler)mod_alias
directive
+ ScriptAlias
which internally forces all files
+ inside the mapped directory to have a handler of
+ ``cgi-script
''.
last|L
'
(last rule)chain|C
'
- (chained with next rule).www
'' part inside a per-directory rule set
- when you let an external redirect happen (where the
- ``.www
'' part should not to occur!).nocase|NC
'
+ (no case)type|T
=MIME-type'
- (force MIME type).php
files to
- be displayed by mod_php
if they are called with
- the .phps
extension:
- noescape|NE
'
+ (no URI escaping of
+ output)handler|H
=Content-handler'
- (force Content handler)mod_alias
directive
- ScriptAlias
which internally forces all files
- inside the mapped directory to have a handler of
- ``cgi-script
''./foo/zed
' into a safe
+ request for '/bar?arg=P1=zed
'.
+
nosubreq|NS
' (used only if
@@ -1553,38 +1535,31 @@ When using the NOT character
sub-requests. In these cases, use this flag.
nocase|NC
'
- (no case)qsappend|QSA
'
- (query string
- append)noescape|NE
'
- (no URI escaping of
- output)proxy|P
' (force
+ proxy)http://
hostname) which can be
+ handled by the Apache proxy module. If not you get an
+ error from the proxy module. Use this flag to achieve a
+ more powerful implementation of the ProxyPass directive,
+ to map some remote stuff into the namespace of the local
+ server.
- which would turn '/foo/zed
' into a safe
- request for '/bar?arg=P1=zed
'.
+ Notice: To use this functionality make sure you have
+ the proxy module compiled into your Apache server
+ program. If you don't know please check whether
+ mod_proxy.c
is part of the ``httpd
+ -l
'' output. If yes, this functionality is
+ available to mod_rewrite. If not, then you first have to
+ rebuild the
mod_rewrite
..
qsappend|QSA
'
+ (query string
+ append)redirect|R
+ [=code]' (force redirect)http://thishost[:thisport]/
(which makes the
+ new URL a URI) to force a external redirection. If no
+ code is given a HTTP response of 302 (MOVED
+ TEMPORARILY) is used. If you want to use other response
+ codes in the range 300-400 just specify them as a number
+ or use one of the following symbolic names:
+ temp
(default), permanent
,
+ seeother
. Use it for rules which should
+ canonicalize the URL and give it back to the client,
+ e.g., translate ``/~
'' into
+ ``/u/
'' or always append a slash to
+ /u/
user, etc.Note: When you use this flag, make
+ sure that the substitution field is a valid URL! If not,
+ you are redirecting to an invalid location! And remember
+ that this flag itself only prefixes the URL with
+ http://thishost[:thisport]/
, rewriting
+ continues. Usually you also want to stop and do the
+ redirection immediately. To stop the rewriting you also
+ have to provide the 'L' flag.
skip|S
=num'
(skip next rule(s))env|E=
VAR:VAL'
- (set environment variable)$N
and
- %N
which will be expanded. You can use this
- flag more than once to set more than one variable. The
- variables can be later dereferenced in many situations, but
- usually from within XSSI (via <!--#echo
- var="VAR"-->
) or CGI (e.g.
- $ENV{'VAR'}
). Additionally you can dereference
- it in a following RewriteCond pattern via
- %{ENV:VAR}
. Use this to strip but remember
- information from URLs.type|T
=MIME-type'
+ (force MIME type).php
files to
+ be displayed by mod_php
if they are called with
+ the .phps
extension:
+ cookie|CO=
NAME:VAL:domain[:lifetime[:path]]'
- (set cookie)