Zusätzlich noch -> www in htaccess

Hi,
aktuell läuft mein Shop mit und ohne www. gleich.
Wie bekommt man in diesen Codeschnipsel noch mit rein das immer auf www geleitet wird?


Options +FollowSymLinks
RewriteEngine On
RewriteBase /shop/

RewriteCond %{REQUEST_URI} oxseo\.php$
RewriteCond %{QUERY_STRING} mod_rewrite_module_is=off
RewriteRule oxseo\.php$ oxseo.php?mod_rewrite_module_is=on [L]

RewriteCond %{REQUEST_URI} !(\/admin\/|\/core\/|\/export\/|\/modules\/|\/out\/|\/setup\/|\/tmp\/|\/views\/)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !(\.html|\/|\.jpg|\.css|\.pdf|\.doc|\.gif|\.png|\.js)$ %{REQUEST_URI}/ [R=301,L]

RewriteCond %{REQUEST_URI} !(\/admin\/|\/core\/|\/export\/|\/modules\/|\/out\/|\/setup\/|\/tmp\/|\/views\/)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (\.html|\/)$ oxseo.php

Mit dem Zusatz gehts nicht:


RewriteCond %{HTTP_HOST} ^domain.de [NC]
RewriteRule (.*) http://www.domain.de/$1 [R=301,L]

[QUOTE=simmsen;51596]
Mit dem Zusatz gehts nicht:


RewriteCond %{HTTP_HOST} ^domain.de [NC]
RewriteRule (.*) http://www.domain.de/$1 [R=301,L]

[/QUOTE]

Versuchs doch mal mit:

RewriteCond %{HTTP_HOST} !www\.deinedomain\.de
RewriteRule ^(.*)$ http://www.deinedomain.de/$1 [L,R=301]

Gruß

Wir haben


RewriteCond %{HTTP_HOST} ^domain\.de$ [NC] 
RewriteRule ^(.*) http://www.domain.de/$1 [R=301,L]

nach


RewriteRule !(\.html|\/|\.jpg|\.css|\.pdf|\.doc|\.gif|\.png|\.js)$ %{REQUEST_URI}/ [R=301,L]

vor


RewriteCond %{REQUEST_URI} !(\/admin\/|\/core\/|\/export\/|\/modules\/|\/out\/|\/setup\/|\/tmp\/|\/views\/)

Das funktioniert.

Es liegt nicht an der Postition. Ganz unten geht auch, das Problem ist der Fehler in der Syntax.

Falsch

RewriteCond %{HTTP_HOST} ^domain.de [NC]
RewriteRule (.*) http://www.domain.de/$1 [R=301,L]

Richtig

RewriteCond %{HTTP_HOST} ^domain\.de$ [NC] 
RewriteRule ^(.*) http://www.domain.de/$1 [R=301,L]

Grüße

Danke! Musste nur noch /shop/ dazwischen machen, da ich in einem Unterverzeichnis bin