• User

    Problema con phpbb2plus e mod rewrite

    Salve a tutti, qualcuno può aiutarmi?

    Sto testando il phpbb2plus su server Linux, ho abilitato il mod. rewrite preinstallato dal pannello admin, ed ho aggiunto il seguente htacces come da istruzioni:


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

    ############################################################

    RewriteEngine On

    ############################################################

    prevent access from santy webworm a-e

    RewriteCond %{QUERY_STRING} ^(.)highlight=%2527
    RewriteCond %{QUERY_STRING} ^(.
    )rush=%65%63%68
    RewriteCond %{QUERY_STRING} ^(.)rush=echo
    RewriteCond %{QUERY_STRING} ^(.
    )echr(.)
    RewriteCond %{QUERY_STRING} ^(.
    )esystem(.)
    RewriteCond %{QUERY_STRING} ^(.
    )union(.)
    RewriteCond %{QUERY_STRING} ^(.
    )UNION(.)
    RewriteCond %{QUERY_STRING} ^(.
    )alert(document(.)
    RewriteCond %{QUERY_STRING} ^(.
    )SQL_INJECTION(.)
    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.*
    RewriteRule ^.*$ http://127.0.0.1/ [R,L]

    #########################################################

    Mod Rewrite Rules for Static URLs can be found in this file.

    You have to set the correct Path to your Forum here otherwise this will not work !

    Just change the "YOUR_PATH" in the below code to the path your Forum uses.

    For example if your Forum can be reached at http://www.myforum.com/phpBB2/ you have

    to set the path to this

    RewriteBase /phpBB2/

    ^^^^^^

    If your Forum can be reached at http://www.myforum.com you can delete the path part

    RewriteBase /

    After making all needed changes in this file rename it to .htaccess and delete the original

    .htaccess file

    ############################################################

    RewriteBase /phpBB2/

    extended rewriting only for .html [thx to Caterham]

    RewriteRule !.html$ -

    RewriteRule ^forums.html$ index.php

    RewriteRule ^forumc([0-9]).html$ index.php?c=$1
    RewriteRule ^forumc([0-9]
    ),(.*).html$ index.php?c=$1

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

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

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

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

    Ho corretto il percorso... e alla fine mi da Internal Error.

    1. Il phpbb2plus è stato installato in un sottodominio, cmq mettendo tutte le varianti dei percorsi possibili non ho avuto risultati.
    2. facendo una copia e posizionandolo nella root principale non da risultati.

    Root principale: home/malina/public_html/
    Root sottodominio: home/malina/public_html/forum
    :fumato:


  • User

    Ho risolto...