Hallo liebe Community!
Zuerst einmal sag ich hallo in diesem Forum. Nun zu meinem Problem:
Ich habe einen Apache 2 Server mit mehreren virtuellen Hosts laufen und möchte nun die Eingabe einer flaschen Subdomain ( z.B. dsfdsf.domainname.de) auf die Hauptdomain domainname.de umleiten.
Wenn nur eine Domain auf dem Server läuft ist das kein Problem, dann funktioniert es auch. Aber bei mehreren wird man immer auf die Hauptdomain umgeleitet. Kann man dieses Problem irgendwie lösen?
Also das jede nicht existierende Subdomain zu Ihrer Hauptdomain umgeleitet wird.
z.B. safdf.domain1.de -> Umleitung auf http://www.domain1.de
fgfddf.domain2.de -> Umleitung auf http://www.domain2.de
Vielen Dank für Eure Hilfe.
Gruß Flashrider
[Apache] Angabe einer flaschen Subdomain abfangen
-
alexander newald
- Posts: 1117
- Joined: 2002-09-27 00:54
- Location: Hannover
- Contact:
Re: [Apache] Angabe einer flaschen Subdomain abfangen
Zuerst alle normalen VHost Abschnitte eintragen und dann am Ende der httpd.conf für jede Hauptdomain einen Eintrag für
ServerName *.hauptdomain.tld
ServerName *.hauptdomain.tld
Re: [Apache] Angabe einer flaschen Subdomain abfangen
Wenn man soetwas macht, dann bitte richtig:Alexander Newald wrote:ServerName *.hauptdomain.tld
ServerName http://www.hauptdomain.tld
ServerAlias *.hauptdomain.tld
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
-
alexander newald
- Posts: 1117
- Joined: 2002-09-27 00:54
- Location: Hannover
- Contact:
Re: [Apache] Angabe einer flaschen Subdomain abfangen
Zumindest bei mir wird dann allerdings der evtl. schon vorher festgelegte VHost http://www.hauptdomain.tld überschrieben
-
flashrider
- Posts: 6
- Joined: 2005-03-20 14:24
Re: [Apache] Angabe einer flaschen Subdomain abfangen
Vielen Dank für Eure gute Hilfe. Es hat einwandfrei funktioniert. Einen schönen Abend noch.
