Revision 1 as of 2008-12-31 03:29:50
converted to 1.6 markup
|Deletions are marked like this.||Additions are marked like this.|
|Line 18:||Line 18:|
|'' Back to ["RewriteFlags"] ''||'' Back to [[RewriteFlags]] ''|
The R flag forces a redirection. If you make the substitution a fully-qualified URL, this will force an external redirection. Additionally, you can specify a redirection status code, in the range 300-400. The default is a 302 (MOVED TEMPORARILY) status code.
The following example is a trifle silly, as it can be better (more efficiently) accomplished with a simple Redirect, but perhaps it will convey the idea. This example will redirect any request to your site to that same URL request on the other site. That is to say, the URL http://your.host.com/something/here will be redirected to http://other.example.net/something/here. And this will all be done with a status code of 303 (SEE OTHER).
RewriteEngine On RewriteRule (.*) http://other.example.com$1 [R=303]
Also valid is the verbose syntax 'redirect' instead of R.
RewriteRule (.*) http://other.example.com$1 [redirect=303]
Back to RewriteFlags