Sven Rautenberg: Permanente Umleitung von Verzeichnissen

Beitrag lesen

Moin!

Wieso hast du, trotz Lesens der Tipps für Fragende, keine vernünftige Problembeschreibung?

Wieso Fragmente? Ist es so besser:

RedirectMatch permanent http://www.domain.de/verzeichnis/([^.]+) http://sub.domain.de/verzeichnis/$1

als auch

RedirectMatch permanent /verzeichnis/([^.]+) http://sub.domain.de/verzeichnis/$1

funktioniert nicht.

Warum RedirectMatch? Deine Anforderung steht exakt so in der Doku zu Redirect.

Example: Redirect /service http://foo2.example.com/service
If the client requests http://example.com/service/foo.txt, it will be told to access http://foo2.example.com/service/foo.txt instead. Only complete path segments are matched, so the above example would not match a request for http://example.com/servicefoo.txt.

- Sven Rautenberg