Seite 1 von 1

htacess welches script?

Verfasst: 19.02.2008, 12:17
von ELRubio
hallo was ist am sinnvolsten im hinblick auf die google positionen:


RewriteEngine on

RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^index.html$ https://www.xxxx.com/index.html [R=301,L]


oder wo ich dann jede unterseite mit eintragen muss,

Redirect permanent /1bla.html https://www.neue-domain.de/1bla.html
Redirect permanent /2bla.html https://www.neue-domain.de/2bla.html
Redirect permanent /3bla.html https://www.neue-domain.de/3bla.html

Verfasst:
von

Re: htacess welches script?

Verfasst: 19.02.2008, 13:24
von proit
ELRubio hat geschrieben: RewriteEngine on

RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^index.html$ https://www.xxxx.com/index.html [R=301,L]


oder wo ich dann jede unterseite mit eintragen muss,

Redirect permanent /1bla.html https://www.neue-domain.de/1bla.html
Redirect permanent /2bla.html https://www.neue-domain.de/2bla.html
Redirect permanent /3bla.html https://www.neue-domain.de/3bla.html
Es ist ein beiden fällen ein redirect permanent (=301). Warum also einzeln eintragen?

Verfasst: 19.02.2008, 15:29
von linux
oder besser mim apachen/webserver

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.altedomain.de [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) https://www.neuedomain.de/$1 [L,R=301]

es werde alle altedomain/ddsasddas.html dann per wildcard auf neuedomain/ddsasddas.html geleitet

so muß man nicht per hand alle eintragen

Verfasst: 20.02.2008, 00:55
von Dayflame
Danke Linux für den hinweis und Code. Sowas habe ich auch gesucht.