phpBB Italia chiude!
phpBB Italia ringrazia tutti gli utenti che hanno dato fiducia al nostro progetto per ben 9 anni, e che, grazie al grande lavoro fatto da tutto lo Staff (rigorosamente a titolo gratuito), hanno portato il portale a diventare il principale punto di riferimento italiano alla piattaforma phpBB.

Purtroppo, causa motivi personali, non ho più modo di gestirlo e portarlo avanti. Il forum viene ora posto in uno stato di sola lettura, nonché un archivio storico per permettere a chiunque di fruire di tutte le discussioni trattate.

Il nuovo portale di assistenza per l'Italia di phpBB diventa phpBB-Store.it, cui ringrazio per aver deciso di portare avanti questo grande progetto.

Grazie ancora,
Carlo - Amministratore di phpBB Italia

.htaccess da Apache a Nginx, aiuto.

La versione base di phpBB SEO, che fa diventare gli URLs del forum più SEO friendly e Google Compliant.
Rispondi
artax5005
Utente
Utente
Messaggi: 2
Iscritto il: 08/09/2011, 21:42
Sesso: Maschio
Versione: 3.0.8
Server: UNIX/Linux
PHP: 5
Database: Mysql

.htaccess da Apache a Nginx, aiuto.

Messaggio da artax5005 » 08/09/2011, 21:54

Anche dopo aver fatto centinaia di ricerche online e tentativi, di riscrivere le rewrite rules da Apache a Nginx e non essendo riuscito a rendere il mio sito navigabile, chiedo aiuto qua;

Qualcuno potrebbe riscrivermi l'equivalente per il web server nginx?

Questo è il mio .htaccess

Codice: Seleziona tutto

#
# Uncomment the statement below if you want to make use of
# HTTP authentication and it does not already work.
# This could be required if you are for example using PHP via Apache CGI.
#
#<IfModule mod_rewrite.c>
#RewriteEngine on
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#</IfModule>

<Files "config.php">
Order Allow,Deny
Deny from All
</Files>

<Files "common.php">
Order Allow,Deny
Deny from All
</Files>




    # Lines That should already be in your .htacess
    <Files "config.php">
    Order Allow,Deny
    Deny from All
    </Files>
    <Files "common.php">
    Order Allow,Deny
    Deny from All
    </Files>

    # You may need to un-comment the following lines
      Options +FollowSymlinks
    # To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist
      Options -MultiViews
    # REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
    RewriteEngine On
    # Uncomment the statement below if you want to make use of
    # HTTP authentication and it does not already work.
    # This could be required if you are for example using PHP via Apache CGI.
    # RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
    # REWRITE BASE
    RewriteBase /forum/
    # HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN
    # RewriteCond %{HTTP_HOST} !^www\.domain\.net$ [NC]
    # RewriteRule ^(.*)$ http://www.domain.net/$1 [QSA,L,R=301]

    # DO NOT GO FURTHER IF THE REQUESTED FILE / DIR DOES EXISTS
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    #####################################################
    # PHPBB SEO REWRITE RULES ALL MODES
    #####################################################
    # AUTHOR : dcz www.phpbb-seo.com
    # STARTED : 01/2006
    #################################
    # FORUMS PAGES
    ###############
    # FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. "forum" REQUIRES TO BE SET AS FORUM INDEX
    # RewriteRule ^forum/forum\.html$ /forum/index.php [QSA,L,NC]
    # FORUM ALL MODES
    RewriteRule ^forum/(forum|[a-z0-9_-]*-f)([0-9]+)/?(page([0-9]+)\.html)?$ /forum/viewforum.php?f=$2&start=$4 [QSA,L,NC]
    # TOPIC WITH VIRTUAL FOLDER ALL MODES
    RewriteRule ^forum/(forum|[a-z0-9_-]*-f)([0-9]+)/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /forum/viewtopic.php?f=$2&t=$4&start=$6 [QSA,L,NC]
    # TOPIC WITHOUT FORUM ID & DELIM ALL MODES
    RewriteRule ^forum/([a-z0-9_-]*)/?(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /forum/viewtopic.php?forum_uri=$1&t=$3&start=$5 [QSA,L,NC]
    # PHPBB FILES ALL MODES
    RewriteRule ^forum/resources/[a-z0-9_-]+/(thumb/)?([0-9]+)$ /forum/download/file.php?id=$2&t=$1 [QSA,L,NC]
    # PROFILES ALL MODES WITH ID
    RewriteRule ^forum/(member|[a-z0-9_-]*-u)([0-9]+)\.html$ /forum/memberlist.php?mode=viewprofile&u=$2 [QSA,L,NC]
    # USER MESSAGES ALL MODES WITH ID
    RewriteRule ^forum/(member|[a-z0-9_-]*-u)([0-9]+)-(topics|posts)(-([0-9]+))?\.html$ /forum/search.php?author_id=$2&sr=$3&start=$5 [QSA,L,NC]
    # GROUPS ALL MODES
    RewriteRule ^forum/(group|[a-z0-9_-]*-g)([0-9]+)(-([0-9]+))?\.html$ /forum/memberlist.php?mode=group&g=$2&start=$4 [QSA,L,NC]
    # POST
    RewriteRule ^forum/post([0-9]+)\.html$ /forum/viewtopic.php?p=$1 [QSA,L,NC]
    # ACTIVE TOPICS
    RewriteRule ^forum/active-topics(-([0-9]+))?\.html$ /forum/search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
    # UNANSWERED TOPICS
    RewriteRule ^forum/unanswered(-([0-9]+))?\.html$ /forum/search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
    # NEW POSTS
    RewriteRule ^forum/newposts(-([0-9]+))?\.html$ /forum/search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
    # UNREAD POSTS
    RewriteRule ^forum/unreadposts(-([0-9]+))?\.html$ /forum/search.php?search_id=unreadposts&start=$2 [QSA,L,NC]
    # THE TEAM
    RewriteRule ^forum/the-team\.html$ /forum/memberlist.php?mode=leaders [QSA,L,NC]
    # HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

    # FORUM WITHOUT ID & DELIM ALL MODES
    # THESE THREE LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^forum/([a-z0-9_-]+)/?(page([0-9]+)\.html)?$ /forum/viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
    # FIX RELATIVE PATHS : FILES
    RewriteRule ^forum/.+/(style\.php|ucp\.php|mcp\.php|faq\.php|download/file.php)$ /forum/$1 [QSA,L,NC,R=301]
    # FIX RELATIVE PATHS : IMAGES
    RewriteRule ^forum/.+/(styles/.*|images/.*)/$ /forum/$1 [QSA,L,NC,R=301]
    # END PHPBB PAGES
    #####################################################

    
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.net [NC] 
RewriteRule ^(.*)$ http://www.domain.net/$1 [L,R=301]

# BEGIN WPSuperCache
# END WPSuperCache

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
Grazie a chiunque possa risolvermi il problema, perché mi pare di averci perso anche troppo tempo :). Ps, ho cancellato il nome del mio dominio per non essere accusato di farmi pubblcità lol.

Avatar utente
invisibile
phpBB Expert
phpBB Expert
Messaggi: 311
Iscritto il: 08/07/2011, 16:54
Sesso: Maschio
Versione: 3.0.11
Server: UNIX/Linux
PHP: 5.2.17
Database: 5.1.65-cll
Località: http://www.libera-mente.net/forum

Re: .htaccess da Apache a Nginx, aiuto.

Messaggio da invisibile » 08/09/2011, 23:53

Il codice mi sembra corretto anche se il mod rewrite viene attivato un po' troppe volte e poi ci sono righe ripetute tipo questa:

Codice: Seleziona tutto

<Files "config.php">
Order Allow,Deny
Deny from All
</Files>

<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
Se fossi in te sposterei il rewrite del forum dopo quello di wordpress e con una sola attivazione di RewriteEngine on!
www.libera-mente.net/forum ...le rotelle girano!

artax5005
Utente
Utente
Messaggi: 2
Iscritto il: 08/09/2011, 21:42
Sesso: Maschio
Versione: 3.0.8
Server: UNIX/Linux
PHP: 5
Database: Mysql

Re: .htaccess da Apache a Nginx, aiuto.

Messaggio da artax5005 » 09/09/2011, 0:10

si ok, ma non è questo il problema, forse mi sono espresso male. l'.htaccess che ho pubblicato (e perfettamente funzionante) è il file che avevo sul vecchio server su cui girava il webserver Apache, mentre ora, ho trasferito il tutto su un nuovo server, in cui ho installato il webserver Nginx. l'htaccess deve essere riscritto seguendo le regole di riscrittura per Nginx, ma non ci son riuscito nonostante gli innumerevoli tentavi. Grrr

Avatar utente
invisibile
phpBB Expert
phpBB Expert
Messaggi: 311
Iscritto il: 08/07/2011, 16:54
Sesso: Maschio
Versione: 3.0.11
Server: UNIX/Linux
PHP: 5.2.17
Database: 5.1.65-cll
Località: http://www.libera-mente.net/forum

Re: .htaccess da Apache a Nginx, aiuto.

Messaggio da invisibile » 09/09/2011, 19:25

Onestamente non saprei, è un webserver che non conosco però vedendo nel suo wiki ho trovato questo: Regole di riscrittura per l'.htaccess.

Credo sia un buon punto di partenza! ;)
www.libera-mente.net/forum ...le rotelle girano!

Rispondi

Torna a “phpBB SEO URL”

Chi c’è in linea

Visitano il forum: Nessuno e 61 ospiti