Mod_Rewrite w MyBB - problem

Konfiguracja punBB i MyBB.
Kwpolska
Posty: 9
Rejestracja: 30 wrz 2008, 18:05:13
Strona na CBA.pl: cpforum.cba.pl
Płeć: Niewybrana
User Agent: Firefox Linux 1280x1024

Mod_Rewrite w MyBB - problem

Post autor: Kwpolska »

Chcę zainstalować przyjazne linki Mod_Rewrite w MyBB. W instrukcji jest nakazane przekopiowanie i zmiana nazwy htaccess.txt.
Linki przyjazne wyszukiwarkom to krótsze adresy poszczególnych stron należących do Twojego forum - dzięki temu wyszukiwarki lepiej je indeksują, a użytkownicy mogą łatwiej dostać się do ulubionych wątków wpisując ręcznie ich adresy. Na przykład, zamiast wpisywać "showthread.php?tid=1" można będzie napisać po prostu "thread1.html". Aktywując tę opcję musisz pamiętać o wgraniu pliku .htaccess z paczki MyBB do katalogu forum na swoim serwerze. Pamiętaj też, że automatyczne wykrywanie tej opcji może być zawodne na niektórych serwerach. Odwiedź MyBB Wiki, by dowiedzieć się więcej.
Po wgraniu tego pliku i zmianie nazwy moim oczom ukazuje się błąd 500, na dodatek nie używa on plików z /errors/ .
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Co należy zrobić? Załączam treść feralnego HTaccessa.
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/x-javascript text/css text/html text/xml

</IfModule>
traxter
Posty: 14
Rejestracja: 19 sty 2009, 17:38:28
Strona na CBA.pl: www.traxter.cba.pl
Płeć: Mężczyzna
User Agent: Opera Windows 1024x768

Re: Mod_Rewrite w MyBB - problem

Post autor: traxter »

Mam ten sam problem. Czy ktoś może napisać jak sobie z tym poradzić, bo to wina ze strony hostingu.
Awatar użytkownika
fuma
Przyjaciel CBA
Posty: 11168
Rejestracja: 01 sie 2005, 14:57:56
Lokalizacja: z jajka niespodzianki :P
Płeć: Mężczyzna
User Agent: Opera Windows 1440x900

Re: Mod_Rewrite w MyBB - problem

Post autor: fuma »

usunac kolejno:

Kod: Zaznacz cały

Options -MultiViews +FollowSymlinks -Indexes

Kod: Zaznacz cały

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

Kod: Zaznacz cały

<IfModule mod_rewrite.c> 

Kod: Zaznacz cały

<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> 
a po linijce

Kod: Zaznacz cały

RewriteEngine on
dodac

Kod: Zaznacz cały

RewriteBase / 
ODPOWIEDZ