Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
mod_rewrite schreibt meine Url nicht um
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ralf Schmidt  
View profile   Translate to Translated (View Original)
 More options Jul 18 2004, 12:40 pm
Newsgroups: de.comm.software.webserver
From: Ralf Schmidt <nos...@pc-station.de>
Date: Sun, 18 Jul 2004 18:40:45 +0200
Local: Sun, Jul 18 2004 12:40 pm
Subject: mod_rewrite schreibt meine Url nicht um
Hallo,

ich plage mich mit mod_rewrite und dem Apache 1.3.29 rum. Über die
.htaccess möchte ich folgendes erreichen: Alles was nicht *.domain1.com
ist soll nach domain1.com/fehler.htm umgeleitet werden. Aber auch so, das
der Browser die domain1.com Adresse anzeigt.

in meiner .htaccess steht:
RewriteEngine on
RewriteCond %{HTTP_HOST}  !^\.domain1\.com$ [NC]
RewriteRule ^/(.*)        http://domain1.com/fehler.htm?domain=$1 [L,R]

Auch habe ich
RewriteCond %{REQUEST_URI}   !^\.domain1\.com$ [NC] ... ausprobiert.
Beides funktioniert nicht.

Die .htaccess wird ausgewertet, das habe ich mittels eines Syntaxfehler
probiert.

Was mache ich noch falsch?
Lt. google.de und meine Apache-Bibel sollte es so funktionieren.

Danke für Eure Hilfe.

Viele Grüße aus Köln

Ralf Schmidt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Max Dittrich  
View profile   Translate to Translated (View Original)
 More options Jul 19 2004, 3:39 am
Newsgroups: de.comm.software.webserver
From: Max Dittrich <a...@cs.tu-berlin.de>
Date: Mon, 19 Jul 2004 09:39:29 +0200
Local: Mon, Jul 19 2004 3:39 am
Subject: Re: mod_rewrite schreibt meine Url nicht um
Hi,

Ralf Schmidt wrote on Sun, 18 Jul 2004 18:40:45 +0200:

Nichts :) . Nur im Host-Header auf den Du mit Deiner Vorbedingung prüfst
steht vermutlich nicht '.domain1.com'.

Lass einfach den ^-Anker für den Match auf den Anfang einer Zeichenkette
weg.

gruss,
.max


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mario Mueller  
View profile   Translate to Translated (View Original)
 More options Jul 19 2004, 5:31 am
Newsgroups: de.comm.software.webserver
From: Mario Mueller <nulldev...@gmx.net>
Date: Mon, 19 Jul 2004 11:31:03 +0200
Local: Mon, Jul 19 2004 5:31 am
Subject: Re: mod_rewrite schreibt meine Url nicht um
Am Sun, 18 Jul 2004 18:40:45 +0200 schrieb Ralf Schmidt:

> in meiner .htaccess steht:
> RewriteEngine on
> RewriteCond %{HTTP_HOST}  !^\.domain1\.com$ [NC]

So ein Host kann eigentlich nicht kommen. Du meinst sicherlich:

RewriteCond %{HTTP_HOST}  !domain1\.com$ [NC]

Davon abgesehen würde ich eher positiv testen - also wenn falsche
Domain, dann umleiten:

RewriteCond %{HTTP_HOST}  domain2\.com$ [OR]
RewriteCond %{HTTP_HOST}  domain3\.com$
...

Sollte ein kaputter HTTP/1.0 Client keinen Host mitsenden, könnte der
sich evtl. tot rennen.

> RewriteRule ^/(.*)        http://domain1.com/fehler.htm?domain=$1 [L,R]

Lass mal den führenden Slash in der RewriteRule weg. Also:

RewriteRule ^(.*)$       http://domain1.com/fehler.htm?domain=$1 [L,R]

m.m

--
Fremdsprachen Online Lernen   http://www.lingo4u.de/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ralf Schmidt  
View profile   Translate to Translated (View Original)
 More options Jul 19 2004, 7:14 am
Newsgroups: de.comm.software.webserver
From: Ralf Schmidt <nos...@pc-station.de>
Date: Mon, 19 Jul 2004 13:14:48 +0200
Local: Mon, Jul 19 2004 7:14 am
Subject: Re: mod_rewrite schreibt meine Url nicht um
Mario Mueller schrieb:

> RewriteCond %{HTTP_HOST}  !domain1\.com$ [NC]
> Lass mal den führenden Slash in der RewriteRule weg. Also:

> RewriteRule ^(.*)$       http://domain1.com/fehler.htm?domain=$1 [L,R]

Danke das wars!

> Davon abgesehen würde ich eher positiv testen - also wenn falsche
> Domain, dann umleiten:

> RewriteCond %{HTTP_HOST}  domain2\.com$ [OR]
> RewriteCond %{HTTP_HOST}  domain3\.com$

Das wäre mir zu aufwändig. Ich habe hier zuviele virtuelle Domains und
dann jedesmal dafür eine neue Cond zu schreiben. Diese Negation ist
dafür wie geschaffen, alles was nicht ist....

Nochmals danke Euch beiden für den entscheidenen Tipp.

Viele Grüße aus Köln
Ralf Schmidt

--
Das Wort "WINDOWS" stammt aus einem alten Sioux-Dialekt und bedeutet:
"Weißer Mann starrt durch Glasscheibe auf Sanduhr."


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bastian Blank  
View profile   Translate to Translated (View Original)
 More options Jul 20 2004, 9:54 am
Newsgroups: de.comm.software.webserver
From: Bastian Blank <use...@waldi.eu.org>
Date: Tue, 20 Jul 2004 15:54:43 +0200
Local: Tues, Jul 20 2004 9:54 am
Subject: Re: mod_rewrite schreibt meine Url nicht um

Mario Mueller wrote:
> Sollte ein kaputter HTTP/1.0 Client keinen Host mitsenden, könnte der
> sich evtl. tot rennen.

s/kaputter/standardkonformer/
HTTP 1.0 kennt kein Host-Header.

Bastian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mario Mueller  
View profile   Translate to Translated (View Original)
 More options Jul 20 2004, 11:44 am
Newsgroups: de.comm.software.webserver
From: Mario Mueller <nulldev...@gmx.net>
Date: Tue, 20 Jul 2004 17:44:13 +0200
Local: Tues, Jul 20 2004 11:44 am
Subject: Re: mod_rewrite schreibt meine Url nicht um
Am Tue, 20 Jul 2004 15:54:43 +0200 schrieb Bastian Blank:

> Mario Mueller wrote:
>> Sollte ein kaputter HTTP/1.0 Client keinen Host mitsenden, könnte der
>> sich evtl. tot rennen.

> s/kaputter/standardkonformer/
> HTTP 1.0 kennt kein Host-Header.

Das "kaputt" bezog sich auf das "tot rennen". Auch bei HTTP 1.0 sollte
der Client nach einer bestimmten Anzahl Redirects abbrechen. Macht er
das nicht, ist er kaputt.

m.m

--
Fremdsprachen Online Lernen   http://www.lingo4u.de/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »