.htaccess (Short url mod) will nicht

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
parkrocker
Mitglied
Beiträge: 50
Registriert: 24.03.2005 22:18
Wohnort: Zürich

.htaccess (Short url mod) will nicht

Beitrag von parkrocker »

Zuallererst: Mod_rewrite funktioniert bei mir eigentlich problemlos. Aber mit dem Shorturl Mod hab ich grosse Probleme: Und zwar ignoriert mein Webserver komplett die rewrite Rules.

Die sehen folgendermassen aus:

Code: Alles auswählen

DirectoryIndex index.html index.htm portal.php index.php


RewriteEngine On

# prevent access from santy webworm a-e
RewriteCond %{QUERY_STRING} ^(.*)highlight=\%2527 [OR]
RewriteCond %{QUERY_STRING} ^(.*)rush=\%65\%63\%68 [OR]
RewriteCond %{QUERY_STRING} ^(.*)rush=echo [OR]
RewriteCond %{QUERY_STRING} ^(.*)wget\%20
RewriteRule ^.*$ http://127.0.0.1/ [R,L]

# prevent pre php 4.3.10 bug
RewriteCond %{HTTP_COOKIE}% s:(.*):\%22test1\%22\%3b
RewriteRule ^.*$ http://127.0.0.1/ [R,L]

# prevent perl user agent (most often used by santy)
RewriteCond %{HTTP_USER_AGENT} ^lwp.* [NC]
RewriteRule ^.*$ http://127.0.0.1/ [R,L]


# Short URL implementation [larsneo]
RewriteCond %{REQUEST_FILENAME} /forums.html
RewriteRule (.*) /index.php [R=301,L]

RewriteCond %{REQUEST_FILENAME} /index-mark.html
RewriteRule (.*) /index.php?mark=forums [L]

RewriteCond %{REQUEST_FILENAME} /index.html
RewriteRule (.*) /index.php [L]

RewriteCond %{REQUEST_FILENAME} /category([0-9]*).html
RewriteRule (.*) /index.php?c=%1 [L]

RewriteCond %{REQUEST_FILENAME} /forum([0-9]*)-([0-9]*)-([0-9]*).html 
RewriteRule (.*) /viewforum.php?f=%1&topicdays=%2&start=%3 [L]

RewriteCond %{REQUEST_FILENAME} /forum([0-9]*)-([0-9]*).html 
RewriteRule (.*) /viewforum.php?f=%1&start=%2 [L]

RewriteCond %{REQUEST_FILENAME} /forum([0-9]*)-mark.html
RewriteRule (.*) /viewforum.php?f=%1&mark=topics [L]

RewriteCond %{REQUEST_FILENAME} /forum([0-9]*).html
RewriteRule (.*) /viewforum.php?f=%1 [L]

RewriteCond %{REQUEST_FILENAME} /ptopic([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&view=previous [L]

RewriteCond %{REQUEST_FILENAME} /ntopic([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&view=next [L]

RewriteCond %{REQUEST_FILENAME} /ftopic([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*)-([a-zA-Z0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&start=%2&postdays=%3&postorder=%4&highlight=%5 [L]

RewriteCond %{REQUEST_FILENAME} /ftopic([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&postdays=%2&postorder=%3&start=%4 [L]

RewriteCond %{REQUEST_FILENAME} /ftopic([0-9]*)-([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&start=%2 [L]

RewriteCond %{REQUEST_FILENAME} /ftopic([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1 [L]

RewriteCond %{REQUEST_FILENAME} /fpost([0-9]*).html
RewriteRule (.*) /viewtopic.php?p=%1 [L]

RewriteCond %{REQUEST_FILENAME} /post-newtopic-([0-9]*).html
RewriteRule (.*) /posting.php?mode=newtopic&f=%1 [L]

RewriteCond %{REQUEST_FILENAME} /post-reply-([0-9]*).html
RewriteRule (.*) /posting.php?mode=reply&t=%1 [L]

RewriteCond %{REQUEST_FILENAME} /post-([a-z]*)-([0-9]*).html
RewriteRule (.*) /posting.php?mode=%1&p=%2 [L]

RewriteCond %{REQUEST_FILENAME} /album.html
RewriteRule (.*) /album.php [L]

RewriteCond %{REQUEST_FILENAME} /palbum.html
RewriteRule (.*) /album_personal_index.php [L]

RewriteCond %{REQUEST_FILENAME} /palbum([0-9]*).html
RewriteRule (.*) /album_personal.php?user_id=%1 [L]

RewriteCond %{REQUEST_FILENAME} /profile([0-9]*).html
RewriteRule (.*) /profile.php\?mode=viewprofile&u=%1 [L]

RewriteCond %{REQUEST_FILENAME} /search-author-(.*).html
RewriteRule (.*) /search.php\?search_author=%1 [L]

RewriteCond %{REQUEST_FILENAME} /search-([0-9]*)-([0-9]*).html
RewriteRule (.*) /search.php\?search_id=%1&start=%2 [L]

RewriteCond %{REQUEST_FILENAME} /search-([a-zA-Z]*).html
RewriteRule (.*) /search.php\?search_id=%1 [L]

RewriteCond %{REQUEST_FILENAME} /privmsg-([a-zA-Z]*)-([0-9]*).html
RewriteRule (.*) /privmsg.php\?mode=%1&u=%2 [L]

RewriteCond %{REQUEST_FILENAME} /privmsg-([a-zA-Z]*).html
RewriteRule (.*) /privmsg.php\?folder=%1 [L]

RewriteCond %{REQUEST_FILENAME} /register.html
RewriteRule (.*) /profile.php\?mode=register&agreed=true [L]

RewriteCond %{REQUEST_FILENAME} /profile-([a-zA-Z0-9]*).html
RewriteRule (.*) /profile.php\?mode=%1 [L]

RewriteCond %{REQUEST_FILENAME} /map-([0-9]*).html
RewriteRule (.*) /map.php\?highlight=%1 [L]

RewriteCond %{REQUEST_FILENAME} /map.html
RewriteRule (.*) /map.php [L]

RewriteCond %{REQUEST_FILENAME} /faq.html
RewriteRule (.*) /faq.php [L]

RewriteCond %{REQUEST_FILENAME} /search.html
RewriteRule (.*) /search.php [L]

RewriteCond %{REQUEST_FILENAME} /memberlist.html
RewriteRule (.*) /memberlist.php [L]

RewriteCond %{REQUEST_FILENAME} /groups.html
RewriteRule (.*) /groupcp.php [L]

RewriteCond %{REQUEST_FILENAME} /report.html
RewriteRule (.*) /report.php [L]

RewriteCond %{REQUEST_FILENAME} /online.html
RewriteRule (.*) /viewonline.php [L]
ich kriege bei allen Abfragen einen 404

Nur zum vergleich: Folgendes Rewrite geht problemlos:

Code: Alles auswählen

DirectoryIndex index.html index.htm portal.php index.php

ErrorDocument 401 error.php?code=401 

ErrorDocument 403 error.php?code=403 

ErrorDocument 404 error.php?code=404 

ErrorDocument 500 error.php?code=500

RewriteEngine On

RewriteRule ^forums.* /index.php





RewriteRule ^viewforum([0-9]*)-([0-9]*)-([0-9]*).* /viewforum.php?f=$1&topicdays=$2&start=$3

RewriteRule ^mforum([0-9]*).* /viewforum.php?f=$1&mark=topic

RewriteRule ^forum([0-9]*).* /viewforum.php?f=$1



RewriteRule ^ptopic([0-9]*).* /viewtopic.php?t=$1&view=previous

RewriteRule ^ntopic([0-9]*).* /viewtopic.php?t=$1&view=next

RewriteRule ^newtopic([0-9]*).* /viewtopic.php?t=$1&view=newest

RewriteRule ^ftopic([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* /viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4

RewriteRule ^ftopic([0-9]*)-([0-9]*)-([0-9]*)-([a-zA-Z]*)-([a-zA-Z]*).* /viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5

RewriteRule ^ftopic([0-9]*)-([0-9]*).* /viewtopic.php?t=$1&start=$2

RewriteRule ^ftopic([0-9]*).* /viewtopic.php?t=$1

RewriteRule ^sutra([0-9]*).* /viewtopic.php?p=$1
kann mir das wer erklären?? Oder wenigstens helfen? ;) Ich würde lieber den Short URL Mod einsetzen (da vollständiger) wie das funktionierende beispiel ....
parkrocker
Mitglied
Beiträge: 50
Registriert: 24.03.2005 22:18
Wohnort: Zürich

Beitrag von parkrocker »

*bump*
Antworten

Zurück zu „phpBB 2.0: Mod Support“