• Wenn du hier im Forum ein neues Thema erstellst, sind schon Punkte aufgeführt die du ausfüllen musst. Das dient im Allgemeinen dazu die notwendigen Informationen direkt mit der Frage bereitzustellen.
    Da in letzter Zeit immer wieder gerne das Formular gelöscht wurde und erst nach 3 Seiten Nachfragen die benötigten Infos für eine Hilfe kommen, werde ich nun jede Fragestellung die nicht einmal annähernd das Formular benutzt, sofort in den Sondermüll schicken.
    Füllt einfach die abgefragte Daten aus und alle können euch viel schneller helfen.

umleiten auf www.

Paridus

Bekanntes Mitglied
Lizenzinhaber
Registriert
23. Okt. 2014
Beiträge
301
Punkte
58
XF Version
  1. 1.5.1
  2. 1.5.6
ICh habe das Problem mit den URL´s

Es gibt im Forum url´s ohne www und mit. Wenn ich zum Beispiel auf eine Seite ohne www. klicke das werde ich auggeloggt und muss mich neu anmelden.
Im alten Forum hatte ich in die .htaccess folgende Zeilen eingetragen:

Code:
RewriteEngine on

RewriteCond %{HTTP_HOST} !^www\.forum\.de$
RewriteRule ^(.*)$ http://www.forum.de/$1 [L,R=301]
# ende
Was bewirkte das ich immer auf die Seite www. umgeleitet wurde.

Leider funktioniert das nicht mehr. :(
 
Irgendwie will das aber nicht funktionieren. Hier mal die komplette .htaccess, vielleicht könnt ihr mal darüber schauen.

Code:
#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default

<IfModule mod_rewrite.c>
    RewriteEngine On

    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo

    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]

</IfModule>
# 19.11.2015 18:38:17
# Umleiten auf www.
RewriteEngine on

RewriteCond %{HTTP_HOST} !^www\.schulhausmeisterforum\.de$
RewriteRule ^(.*)$ http://www.schulhausmeisterforum.de/$1 [L,R=301]
# ende
 
Probiere mal diese Variante aus .. ;)
Du solltest nämlich deine RewriteCond/RewriteRule auch innerhalb der des <IfModule mod_rewrite.c> habe.

Code:
#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default

<IfModule mod_rewrite.c>
    RewriteEngine On

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

    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo

    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]

</IfModule>
 
Die Umleitung auf eine Variante ist grundsätzlich richtig. Dein Problem mit dem Ausloggen hängt aber vermutlich damit zusammen, dass du www.domain.de als Cookie Domain eingesetzt hat. Damit ist der Cookie nur auf der Subdomain www gültig.
Wenn er über die gesamte Domain gültig sein soll ist .domain.de die richtige Adresse. (Der führende Punkt ist wichtig)
 
Zurück
Oben