Ich habe eine Rewrite-Regel in meinem MVC-Projekt-URL einer HTTP-Anforderung an HTTPS neu zu schreiben:Redirect von HTTP auf HTTPS und auf eine neue Domain mit C# MVC in IIS7.5
<rewrite>
<rules>
<rule name="Redirect HTTP to HTTPS" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Found" />
</rule>
</rules>
</rewrite>
Aber jetzt brauche ich Um alle Anfragen von der ursprünglichen www.company.com auf eine neue URL www2.company.com umleiten
Wie kann ich das tun, um auch das ursprüngliche HTTP zu HTTPS zu behalten?
Änderungen an Google Analytics für diese neue Weiterleitung?
EDIT:
Beispiele:
http://old.company.com -> https://new.company.com
https://old.company.com -> https://new.company.com
http://www.old.company.com -> https://new.company.com
https://www.old.company-com -> https://new.company.com
http://old.company.com/Account/Login -> https://new.company.com/Account/Login
https://old.company.com/Account/Login -> https://new.company.com/Account/Login
Eine Umleitung und eine URL-Umschreibung sind * komplett * verschiedene Dinge. – Amy
Hallo, mein Verständnis davon ist, dass die Rewrite-Regeln mir helfen, die Anfrage umzuleiten, bin ich richtig? – Patrick
Nein, Neuschreibungen haben buchstäblich nichts mit Umleitungen zu tun. Du bist nicht korrekt. – Amy