unglaublich aber wahr:
RewriteCond %{REQUEST_URI} config\.inc\.php [NC]
RewriteRule ^config\.inc\.php index\.php [R=301,L]
Substitution Teil ist kein RegExp und soll NICHT escaped werden! Korrekt ist:
RewriteCond %{REQUEST_URI} config\.inc\.php [NC]
RewriteRule ^config\.inc\.php index.php [R=301,L]
dann fragt mann sich
1. hat der Typ(M/F) Ahnung? (R=301 impliziert L !!)
2. warum wird das nicht getestet? (geht mann auf config.inc.php kommt sofort 500 !!)
3. war wahrscheinlich alles nicht so wichtig…
Andererseits: Ergebnis ist beide gleich - config.inc.php ist unerreichbar
H.
PS: http://httpd.apache.org/docs/current/rewrite/flags.html#flag_qsd
You will almost always want to use [R] in conjunction with [L] (that is, use [R,L]) because on its own, the [R] flag prepends http://thishost[:thisport] to the URI, but then passes this on to the next rule in the ruleset, which can often result in ‘Invalid URI in request’ warnings.
Mea culpa