MyBB.de Forum

Normale Version: htaccess Frage
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Ich nutze das GoogleSEO welches wirklich gut funktioniert.

nun habe ich eine Frage

Ich möchte gern das die Domain
Code:
http://www.wszene-online.de
auf die Domain
Code:
http://wszene-online.de
geleitet wird.

bei meinem anderem Projekt welches kein mybb ist habe ich dieses Problem mit der .htaccess gelöst indem ich diesen Code eingebaut habe
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^domain.de$ [NC]
RewriteRule ^(.*)$ http://domain.de/$1 [L,R=301]

wenn ich diesen Code aber so in meine Vorhandene .htaccess einfüge (natürlich die domain angepasst Toungue) geht es irgendwie nicht

Hier mal meine .htaccess aus dem myBB
Code:
RewriteRule ^([^&]*)&(.*)$ http://wszene-online.de/$1?$2 [L,QSA,R=301]
       ErrorDocument 404 /misc.php?google_seo_error=404
       RewriteRule ^sitemap-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]

Options -MultiViews +FollowSymlinks -Indexes

#
# If mod_security is enabled, attempt to disable it.
# - Note, this will work on the majority of hosts but on
#   MediaTemple, it is known to cause random Internal Server
#   errors. For MediaTemple, please remove the block below
#
<IfModule mod_security.c>
    # Turn off mod_security filtering.
    SecFilterEngine Off

    # The below probably isn't needed, but better safe than sorry.
    SecFilterScanPOST Off
</IfModule>

#
# MyBB "search engine friendly" URL rewrites
# - Note, for these to work with MyBB please make sure you have
#   the setting enabled in the Admin CP and you have this file
#   named .htaccess
#
<IfModule mod_rewrite.c>
    RewriteEngine on
       RewriteRule ^Forum-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]
       RewriteRule ^Thread-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC]
       RewriteRule ^Announcement-([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]
       RewriteRule ^User-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]
       RewriteRule ^Calendar-([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]
       RewriteRule ^Event-([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]

    RewriteRule ^forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
    RewriteRule ^forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]

    RewriteRule ^thread-([0-9]+)\.html$ showthread.php?tid=$1 [L,QSA]
    RewriteRule ^thread-([0-9]+)-page-([0-9]+)\.html$ showthread.php?tid=$1&page=$2 [L,QSA]
    RewriteRule ^thread-([0-9]+)-lastpost\.html$ showthread.php?tid=$1&action=lastpost [L,QSA]
    RewriteRule ^thread-([0-9]+)-nextnewest\.html$ showthread.php?tid=$1&action=nextnewest [L,QSA]
    RewriteRule ^thread-([0-9]+)-nextoldest\.html$ showthread.php?tid=$1&action=nextoldest [L,QSA]
    RewriteRule ^thread-([0-9]+)-newpost\.html$ showthread.php?tid=$1&action=newpost [L,QSA]
    RewriteRule ^thread-([0-9]+)-post-([0-9]+)\.html$ showthread.php?tid=$1&pid=$2 [L,QSA]

    RewriteRule ^post-([0-9]+)\.html$ showthread.php?pid=$1 [L,QSA]

    RewriteRule ^announcement-([0-9]+)\.html$ announcements.php?aid=$1 [L,QSA]

    RewriteRule ^user-([0-9]+)\.html$ member.php?action=profile&uid=$1 [L,QSA]

    RewriteRule ^calendar-([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
    RewriteRule ^calendar-([0-9]+)-year-([0-9]+)\.html$ calendar.php?action=yearview&calendar=$1&year=$2 [L,QSA]
    RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
    RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 [L,QSA]
    RewriteRule ^calendar-([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]

    RewriteRule ^event-([0-9]+)\.html$ calendar.php?action=event&eid=$1 [L,QSA]
    RewriteRule ^Page-([^./]+)$ misc.php?page=$1 [L,QSA,NC]

    <IfModule mod_env.c>
        SetEnv SEO_SUPPORT 1
    </IfModule>
</IfModule>

#
# If Apache is compiled with built in mod_deflade/GZIP support
# then GZIP Javascript, CSS, HTML and XML so they're sent to
# the client faster.
#
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE application/x-javascript text/css text/html text/xml
</IfModule>

was muss muss ich jetzt wie einbauen damit das funktioniert denn momentan ist es so das die Seite bei Eingabe der Domain mit www weiss bleibt

Danke für Eure Hilfe
Am Ende das hier anfügen:
Code:
Redirect http://www.wszene-online.de http://wszene-online.de

Sollte funktionieren.

edit: Hab' ne gute Seite gefunden: http://pc-intern.com/artikel-5256.html

edit2: Das dürfte deiner Vorstellung entsprechen:

Code:
RewriteEngine on

RewriteCond %{HTTP_HOST} ^http://www.wszene-online.de$ [NC]
RewriteRule ^(.*) http://wszene-online.de$1 [L,R=301]
(08.03.2010, 11:30)Falkenauge Mihawk schrieb: [ -> ]
Code:
RewriteEngine on

RewriteCond %{HTTP_HOST} ^http://www.wszene-online.de$ [NC]
RewriteRule ^(.*) http://wszene-online.de$1 [L,R=301]

das ist doch das selbe was ich schon drin hatte
Das mit dem Redirect mache ich genauso.

Code:
[...]
<IfModule mod_rewrite.c>
    RewriteEngine on

    RewriteRule ^([^&]*)&(.*)$ http://www.japanisch-netzwerk.de/$1?$2 [L,QSA,R=301]

    RewriteCond %{HTTP_HOST} !^www\.japanisch-netzwerk\.de$ [NC]
    RewriteRule ^(.*)$ http://www.japanisch-netzwerk.de/$1 [L,QSA,R=301]
[...]

Bei mir funktioniert das auch problemlos so... auch wenns hier in dem Fall das www mit in die URL einbezieht, das ist ja egal...

Das mit der weissen Seite ist generell komisch, vielleicht kommt das von was ganz anderem? Eine .htaccess kann erstmal keine weissen Seiten produzieren, das muss entweder eine leere .html auf deinem Server sein oder eine .php die nichts ausgibt oder sowas.
ich werde es mir dann zuhause nochmal genau anschauen
(08.03.2010, 11:30)Falkenauge Mihawk schrieb: [ -> ]Am Ende das hier anfügen:
Code:
Redirect http://www.wszene-online.de http://wszene-online.de

Sollte funktionieren.

Das ist eine denkbar schlechte Lösung, da so immer auf die Startseite umgeleitet wird.