1. Ustawienie w ACP MyBB musi być następujące :
konfiguracja -> ustawienia -> Ustawienia serwera i optymalizacji -> Włączyć linki przyjazne wyszukiwarkom? -> Włącz
(nie kombinuj z automatycznie itp. Ma być włącz)
2. Zawartość pliku .htaccess musi być następująca :
Kod: Zaznacz cały
# ten plik MUSI znajdowac sie w tym samym folderze co forum, (tam gdzie jest plik global.php)
#
Options +FollowSymlinks -Indexes
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
# MUSISZ poprawic linie znajdujaca sie pod tym komentarzem aby byla zgodna z polozeniem twojego forum
# PRZYKLADY :
# jesli twoje forum znajduje sie w glownym katalogu wpisujesz RewriteBase /
# jesli twoje forum znajduje sie w folderze board, wpisujesz RewriteBase /board
# jesli twoje forum znajduje sie w folderze costam/forum, wpisujesz RewriteBase /costam/forum
RewriteBase /board
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>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript text/css text/html text/xml
</IfModule>
(czyli w tym samym folderze co plik global.php)
4. MUSISZ poprawić w treści tego pliku linie w której jest RewriteBase aby odpowiadała położeniu Twojego forum.
(przeczytaj opis w pliku .htaccess znajdujący się ponad linią którą musisz poprawić. Są tam przyklady co należy wpisać.)
Sposób opisany powyżej jest przetestowany na CBA i działa.