https:///index2.html
Kann man das irgendwie erreichen (ohne Einstellungen von URL
rewrites im IIS oder Apache)? Evtl. mit JavaScript?
Du kannst ja mit JS die Location auslesen:
pfad=document.location.href;
Jetzt baust du entweder 'ne elegante Umwandlung mit split oder substr oder so, oder du baust eine plumpe if-Reihe:
if (pfad.IndexOf(‚domain1‘)>-1) {neuedom=‚domain1‘}
else if (pfad.IndexOf(‚domain2‘)>-1) {neuedom=‚domain2‘}
und bastelst die neue URL zusammen und refresht dorthin:
neueurl=‚https://‘+neuedom+’/index2.html’;
document.location.href=neueurl;
Wie gesagt, elegant ist was anderes, aber ich bin heute nicht so in Grübellaune. Müsste aber funktionieren.
Gruß Ingo