Ich denke, ich habe Probleme mit SEO, weil ich 2 Domains auf dem gleichen Server verwende.Subdomäne und Unterordner zur Stammdomäne umleiten
Im Stammverzeichnis habe ich www.dinastiabus.pt und in root/viasescola.pt habe ich www.viaescola.pt.
Dinastiabus ist gut indiziert von Google, aber Viaescola ist nicht.
Was ich denke, ich tun muß, ist mit .htaccess zu umleiten:
- viaescola.dinastiabus.pt
- und dinastiabus.pt/viaescola.pt/ viaescola.pt viaescola.pt
Auch wenn es nicht das Problem ist, möchte ich es trotzdem tun. Ich möchte auch den Link immer www haben.
Dies ist, was ich in diesem Moment haben (aber obwohl es nicht einmal alles hat ich will es einfach nicht funktioniert!):
RewriteEngine on
# Redirect to domain to www.
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# 301 Redirect URLs.
RedirectMatch 301 ^/www\.dinastiabus\.pt/viaescola\.pt/(.*)$ /www.viaescola.pt/$1
RedirectMatch 301 ^/dinastiabus\.pt/viaescola\.pt/(.*)$ /www.viaescola.pt/$1
# Prevent viewing of htaccess file.
<Files .htaccess>
order allow,deny
deny from all
</Files>
# Prevent directory listings
Options All -Indexes
ich viaescola.dinastiabus.pt wollen www.viaescola.pt, www.viaescola .dinastiabus.pt bis www.viaescola.pt, dinastiabus.pt/viaescola.pt bis www.viaesco la.pt und www.dinastiabus.pt/viaescola.pt bis www.viaescola.pt –
Ok, es leitet nur nicht um, wenn es www.viaescola.dinastiabus.pt ist der ganze Rest funktioniert –
Ich habe einen kleinen gemacht Update auf den ersten 'RewriteCond' - es sollte jetzt funktionieren. – Rounin