Hallo, Gast! (Registrieren)

Wir wünschen allen Besuchern frohe Ostern!

Letzte Ankündigung: MyBB 1.8.37 veröffentlicht (04.11.23)


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste
Suchmaschinenfreundliche URLs aktivieren
#21
Du hast auch den Pfad angepasst wie Falkenauge Mihawk geschrieben hat, oder?
#22
Du meinst die URL unter den Konfigurationseinstellungen? Die war schon nach der Installation auf www.megadroi.de/forum gesetzt..

Bin echt ratlos..
#23
In der WordPress .htaccess vor der RewriteRule einfügen:

Code:
RewriteCond %{REQUEST_URI} !^/forum(/|$)

Spätestens dann sollte /forum /forum/ /forum/* ignoriert werden von WordPress...
#24
Das habe ich jetzt leider nicht ganz verstanden... ich werde einfach mal zur besseren Übersicht genau zeigen wie es bei mir aussieht.

Wordpress .htaccess (liegt im Root Ordner zusammen mit Wordpress):
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

MyBB .htaccess (liegt Im Ordner /forum):
Code:
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-([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]

    <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/javascript text/css text/html text/xml
</IfModule>

Ich bedanke mich bei allen die bis jetzt geholfen haben! (:
#25
Du musst bei den Rewrite Regeln vom Forum auch das Verzeichnis /forum/ davor hängen. Beispiel:
Code:
RewriteRule ^/forum/forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]

Das musst du dann logischerweise überall in der .htaccess machen (alles was im mod_rewrite Bereich steht).

Grüße
#26
Setz bei WordPress die RewriteCond die ich geschrieben habe einfach zu den anderen RewriteCond dazu dann wirds schon stimmen

@Devon: nein, wenn dann RewriteBase /forum/ wenn das nicht sowieso der Default ist, aber erstmal muss WordPress das forum in Ruhe lassen
#27
Habe das gemacht und Die Suchmaschinenfreundlichen URLs wieder aktiviert. Und jetzt diesen Fehler ausgespuckt bekommen wenn ich ein Forum öffnen wollte: The requested URL /forum/forum-34.html was not found on this server.

Die .htaccess hatte ich so bearbeitet:
Code:
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/forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
    RewriteRule ^/forum/forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]

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

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

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

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

    RewriteRule ^/forum/calendar-([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
    RewriteRule ^/forum/calendar-([0-9]+)-year-([0-9]+)\.html$ calendar.php?action=yearview&calendar=$1&year=$2 [L,QSA]
    RewriteRule ^/forum/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
    RewriteRule ^/forum/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 ^/forum/calendar-([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]

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

    <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/javascript text/css text/html text/xml
</IfModule>

(29.06.2013, 20:42)frostschutz schrieb: Setz bei WordPress die RewriteCond die ich geschrieben habe einfach zu den anderen RewriteCond dazu dann wirds schon stimmen

@Devon: nein, wenn dann RewriteBase /forum/ wenn das nicht sowieso der Default ist, aber erstmal muss WordPress das forum in Ruhe lassen

Hi frostschutz,

Hat leider auch nicht geklappt. Wieder der 404er wenn ich ein Forum öffnen will.
Meine Wordpress .htaccess sah dann so aus (hoofe ich habe die RewriteCond richtig gesetzt):
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_URI} !^/forum(/|$)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
#28
Mach das /forum/ bei der MyBB .htaccess wieder raus.

Evtl. nach RewriteEngine On ein RewriteBase /forum/ rein.

Eigentlich sollte es dann tun.
#29
Das /forum bei der MyBB htaccess hatte ich schon rausgenommen.

Nach deinem letzten Tipp gings leider immer noch nicht. Die WP htaccess sieht jetzt so aus:
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /forum/
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_URI} !^/forum(/|$)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
#30
Nein, nein, das RewriteBase /forum/ muss wenn dann bei MyBB rein


Möglicherweise verwandte Themen…
Thema Verfasser Antworten Ansichten Letzter Beitrag
  Suchmaschinenfreundliche URLs susi 7 1.639 17.02.2014, 01:11
Letzter Beitrag: susi
  Suchmaschinenfreundliche URL's - htaccess DerSteveT 1 1.024 27.12.2012, 18:14
Letzter Beitrag: Jockl