Results 1 to 3 of 3

Problem mit der .htaccess

This is a discussion on Problem mit der .htaccess within the Deutsch forums, part of the General Discussion category; Hallo an alle, zur Information: Ich habe sowohl vBSEO 2.4.0 als auch den Hack 'Google Sitemap Generator 1.5' bei meinem ...

  1. #1
    Member
    Join Date
    Oct 2005
    Posts
    30
    Liked
    0 times

    Problem mit der .htaccess

    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:

    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$ 
    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]
    Zudem habe ich eine weitere .htaccess-Datei im Forum-Root
    http://www.abcdefghijk.de/forum/ mit folgendem Inhalt abgelegt:

    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]
    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.

    Nun habe ich folgende Ergänzung in der .htaccess-Datei im Forum-Root vorgenommen:

    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]
    Nach dieser Ergänzung (die zwei roten Code-Zeilen) scheint das Problem gelöst.

    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

  2. #2
    Senior Member
    Real Name
    Philipp Herbers
    Join Date
    Sep 2005
    Location
    Meppen, Germany
    Posts
    8,436
    Liked
    0 times
    Hallo rike,

    ich werde dein Problem mal weiterleiten.

    P.S.: PN unterwegs

  3. #3
    Senior Member
    Real Name
    Philipp Herbers
    Join Date
    Sep 2005
    Location
    Meppen, Germany
    Posts
    8,436
    Liked
    0 times
    Guten Morgen,

    um es kurz zu machen, du hast alles richtig gemacht

Similar Threads

  1. .htaccess problem right off
    By eJM in forum Custom Rewrite Rules
    Replies: 10
    Last Post: 08-01-2006, 10:27 PM
  2. Problem mit dem LogIn
    By smartie in forum Deutsch
    Replies: 5
    Last Post: 05-04-2006, 09:40 PM
  3. Problem mit Portal und Startseite?
    By fade in forum Deutsch
    Replies: 16
    Last Post: 03-22-2006, 09:44 AM
  4. Problem mit Last Post
    By Rigorch Bury in forum Deutsch
    Replies: 4
    Last Post: 10-28-2005, 11:53 AM
  5. Internal 500 Error -- problem with .htaccess
    By ADM in forum Troubleshooting
    Replies: 6
    Last Post: 10-11-2005, 05:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •