|
|||
htaccess-Datei Umleitung mehrerer Domains
Hallo Leute,
ich stehe vor der Herausforderung eine .htaccess Datei zu erstellen, die folgendes macht: 1. Anfragen an http://www.hauptdomain.com an https://www.hauptdomain.com 2. Anfragen an http://hauptdomain.com an https://www.hauptdomain.com 3. Anfragen an http://www.hauptdomain.de an https://www.hauptdomain.com 4. Anfragen an http://hauptdomain.de an https://www.hauptdomain.com 5. Anfragen von http://www.nebendomain1.com an https://www.hauptdomain.com 6. Anfragen von http://nebendomain1.com an https://www.hauptdomain.com 7. Anfragen von http://www.nebendomain1.de an https://www.hauptdomain.com 8. Anfragen von http://nebendomain1.de an https://www.hauptdomain.com Sprich: ich habe mehrere Domains und möchte dass alle Anfragen an diese Domains, mit oder ohne www, immer auf der https://www.hautpdomain.com laden. Dazu habe ich beim Registrar entsprechend alle A-Pointer gesetzt. Nun brauche ich nur noch die .htaccess Datei aber alle meine Versuche sind bislang fehlgeschlagen. Kann mir jemand helfen? |
Sponsored Links |
|
||||
Welche Versuche?
(Und du solltest wenn du die Links im Text umwandeln läßt, z.b. example.org verwenden https://www.iana.org/domains/reserved so sind das ein dutzend toter Links und eine die etwas schwer erreichbar ist) |
Sponsored Links |
|
|||
Also ich habe das hier gebaut, aber es funktioniert nur teilweise:
Code:
RewriteCond %{HTTP_HOST} ^(.*)hauptdomain.com [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.hauptdomain.com/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^(.*)hauptdomain.de [NC] RewriteRule ^(.*)$ https://www.hauptdomain.com/$1 [R=301,L] (Sorry, aber zum Verständnis habe ich nun die domains belassen.) |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
301 umleitung in der htaccess - bester code | irmen | Serveradministration und serverseitige Scripte | 4 | 11.04.2017 13:48 |
Umleitung mittels htaccess und redirect funktioniert nur für Startseite | Holley | Serveradministration und serverseitige Scripte | 3 | 26.01.2011 10:56 |
Lightbox mit zweiter CSS Datei funktioniert nicht | T4ke | CSS | 12 | 11.12.2007 20:20 |
Styles mehrerer Seiten in einer css Datei? | manuu | CSS | 5 | 07.02.2006 14:25 |
[php/http] datei an client senden | Xenon | Serveradministration und serverseitige Scripte | 13 | 21.03.2005 21:54 |