[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Frage zur Konfiguration von Webserver



Am Dienstag, den 17.02.2009, 17:00 +0100 schrieb Hans-Dietrich Kirmse:
> 3. Variante:
> 
> > <Directory "/var/www/lehrer">                                                                    
> >     RewriteEngine on                                                                            
> >     RewriteCond %{SERVER_PORT} !^443$                                                           
> >     RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]                                 
> > </Directory>

> Diese RewriteRule verstehe ich schon bis auf dieses [L,R] am Ende. Kann
> ich noch die Bedeutung davon erfahren?

Nachzulesen auf:
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html

'last|L' (last rule)
Stop the rewriting process here and don't apply any more rewrite rules.
This corresponds to the Perl last command or the break command in C. Use
this flag to prevent the currently rewritten URL from being rewritten
further by following rules. Remember, however, that if the RewriteRule
generates an internal redirect (which frequently occurs when rewriting
in a per-directory context), this will reinject the request and will
cause processing to be repeated starting from the first RewriteRule.

'redirect|R [=code]' (force redirect)
Prefix Substitution with 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) will be returned. If you want
to use other response codes, simply specify the appropriate number or
use one of the following symbolic names: temp (default), permanent,
seeother. Use this for rules to canonicalize the URL and return it to
the client - to translate ``/~'' into ``/u/'', or to always append a
slash to /u/user, etc.
Note: When you use this flag, make sure that the substitution field is a
valid URL! Otherwise, you will be redirecting to an invalid location.
Remember that this flag on its own will only prepend
http://thishost[:thisport]/ to the URL, and rewriting will continue.
Usually, you will want to stop rewriting at this point, and redirect
immediately. To stop rewriting, you should add the 'L' flag.

While this is typically used for redirects, any valid status code can be
given here. If the status code is outside the redirect range (300-399),
then the Substitution string is dropped and rewriting is stopped as if
the L flag was used.

Mehr dazu auf der o.a. Seite.

> Unabhängig davon möchte ich mich jetzt schon für die kompetente
> Unterstützung in dieser Liste recht herzlich bedanken.
> 
> 
> Mit freundlichen Grüßen
> Hans-Dietrich

mfG Sascha


Reply to: