Hoi,
Das ID= ist ein ganz normaler String. Das $1 ist wichtig:
darin steht die Zahl, weil ich das '[0-9]+' in Klammern stehen
hatte.
und wieso ausgerechnet $1?
Weil es die erste Klammer ist. Die zweite Klammer stuende in $2,
die Dritte in $3, etc.
Was ist das überhaupt für eine Sprache - PERL???
Nein, Regular Expressions.
[... /123 statt 123 ...]
Aber das scheint ja in diesem Fall kein Problem zu sein!
In der Tat, nein. Ich speichere ja nur die Ziffern in den Klammern.
Aber wenn das so "einfach" ist, lohnt es sich ja anscheinend
wirklich mal sich damit richtig auseinander zu setzen!
Natuerlich.
Wenn das so klappt,
Das wird genau dann klappen, wenn mod_rewrite installiert ist.
nicht schlecht, Error-Variante war doch ganz schöner Mist :-)
Vor allem produziert sie 404-Eintraege in der Error-Log.
Oh doch, das findest du da ;-)
Danke für die Erklärung, aber wirklich, wenn ich in
http://httpd.apache.org/docs/mod/mod_rewrite.html nach
"[R" oder "[L" suche finde ich zwar alles mögliche, aber kleine
EWrklärung, was es bedeutet! Andere Parameter werden wohl erklärt!
Aus http://httpd.apache.org/docs/mod/mod_rewrite.html:
* '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) 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.
Gruesse,
c.j.k