Hallo an alle,
zur Information: Ich habe sowohl vBSEO 2.4.0 als auch den Hack 'Google Sitemap Generator 1.5' bei meinem vBulletin 3.5.4 im Einsatz.
Ziel: Alle Aufrufe von http://abcdefghijk.de sollen permanent (301) weitergeleitet werden auf http://www.abcdefghijk.de.
Problem: bei Eingabe von http://abcdefghijk.de wird korrekt umgeleitet auf www.abcdefghijk.de. Wenn ich jedoch http://abcdefghijk.de/forum/ eingebe, funktioniert diese Weiterleitung nicht.
Anmerkung: Ich arbeite dabei sowohl mit einer .htaccess-Datei im Root als auch mit einer weiteren .htaccess-Datei im Forum-Root.
Ich habe in meinem Root-Verzeichnis http://www.abcdefghijk.de eine .htaccess-Datei mit folgendem Inhalt:
Zudem habe ich eine weitere .htaccess-Datei im Forum-RootCode:# Comment the following line (add '#' at the beginning) # to disable mod_rewrite functions. # Please note: you still need to disable the hack in # the vBSEO control panel to stop url rewrites. RewriteEngine on RewriteCond %{HTTP_HOST} !^www.abcdefghijk.de$ RewriteRule ^(.*)$ http://www.abcdefghijk.de/$1 [L,R=301] RewriteCond %{REQUEST_FILENAME} !forum/ RewriteCond %{QUERY_STRING} !vbseourl= RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ forum/vbseo.php?vbseourl=$1&vbseorelpath=../&%{QUERY_STRING} [L] RewriteCond %{REQUEST_FILENAME} !forum/ RewriteRule ^(.*.php)$ forum/vbseo.php?vbseourl=$1&vbseorelpath=../&%{QUERY_STRING} [L]
http://www.abcdefghijk.de/forum/ mit folgendem Inhalt abgelegt:
Wie gesagt, bei Eingabe von http://abcdefghijk.de wird korrekt umgeleitet auf www.abcdefghijk.de. Wenn ich jedoch http://abcdefghijk.de/forum/ eingebe, funktioniert diese Weiterleitung nicht.Code:# Comment the following line (add '#' at the beginning) # to disable mod_rewrite functions. # Please note: you still need to disable the hack in # the vBSEO control panel to stop url rewrites. RewriteEngine On # Some servers require the Rewritebase directive to be # enabled (remove '#' at the beginning to activate) # Please note: when enabled, you must include the path # to your root vB folder (i.e. RewriteBase /forums) #RewriteBase / RewriteRule ^(sitemap.*.(xml|txt)(.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L] RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQUEST_FILENAME} (admincp|modcp|clientscript|cpstyles|images)/ RewriteRule ^(.*)$ $1 [L] RewriteCond %{QUERY_STRING} !vbseourl= RewriteCond %{REQUEST_FILENAME} !chat RewriteRule ^(.*.php)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L] RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
Nun habe ich folgende Ergänzung in der .htaccess-Datei im Forum-Root vorgenommen:
Nach dieser Ergänzung (die zwei roten Code-Zeilen) scheint das Problem gelöst.Code:# Comment the following line (add '#' at the beginning) # to disable mod_rewrite functions. # Please note: you still need to disable the hack in # the vBSEO control panel to stop url rewrites. RewriteEngine On RewriteCond %{HTTP_HOST} !^www.abcdefghijk.de.de$ RewriteRule ^(.*)$ http://www.abcdefghijk.de/forum/$1 [L,R=301] # Some servers require the Rewritebase directive to be # enabled (remove '#' at the beginning to activate) # Please note: when enabled, you must include the path # to your root vB folder (i.e. RewriteBase /forums) #RewriteBase / RewriteRule ^(sitemap.*.(xml|txt)(.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L] RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQUEST_FILENAME} (admincp|modcp|clientscript|cpstyles|images)/ RewriteRule ^(.*)$ $1 [L] RewriteCond %{QUERY_STRING} !vbseourl= RewriteCond %{REQUEST_FILENAME} !chat RewriteRule ^(.*.php)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L] RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
Da ich jedoch nur rudimentäre Ahnung von mod_rewrite habe, möchte ich sicherstellen, dass dies so in Ordnung ist.
Kann mir jemand von Euch sagen, ob das soweit in Ordung ist?
Vielen Dank,
Grüße
rike


LinkBack URL
About LinkBacks





Reply With Quote
