- Home
- Categorie
- Coding e Sistemistica
- CMS & Piattaforme Self-Hosted
- Guida - Installare e configurare le URL su MyBB con Seo Plugin
- 
							
							
							
							
							
Guida - Installare e configurare le URL su MyBB con Seo PluginUna volta installata la board scarica il pacchetto seo_plugin per mybb in modo da averlo in formato zip come qui 
  
 Scompattalo ed entra nella cartella per vedere questi files
  
 Copia il file SEO.php nella cartella inc/plugins del tuo forum
  
 In modo da avere, nella cartella, una situazione simile a questa (probabilmente avrai più plugins ) )
  
 Ora vai nella gestione dei plugins nell?ACP del tuo forum (Configurazione>Plugins) e vedi il plugin seo tra quelli disponibili
  
 Per attivarlo basta cliccare su Activate (o attiva)
  
 Il file htaccess nella root dovrebbe avere queste righe
 RewriteEngine On
 #RewriteBase /mybb/
 RewriteRule ^index.html$ index.php [L,NE]
 RewriteRule ^(.)-t-([0-9]+).html(.)$ showthread.php?tid=$2$3 [QSA,L]
 RewriteRule ^(.)-t-([0-9]+)-([0-9]+).html$ showthread.php?tid=$2&page=$3 [QSA,L]
 RewriteRule ^(.)-f-([0-9]+).html(.)$ forumdisplay.php?fid=$2$3 [QSA,L]
 RewriteRule ^(.)-u-([0-9]+).html$ member.php?action=profile&uid=$2 [QSA,L]
 RewriteRule ^members/(.)-([0-9]+).html$ member.php?action=profile&uid=$2 [QSA,L]
 RewriteRule ^(.)/(.)-f-([0-9]+).html(.)$ forumdisplay.php?fid=$2$3 [QSA,L]
 RewriteRule ^(.)-f-([0-9]+)-([0-9]+).html(.)$ forumdisplay.php?fid=$2&page=$3 [QSA,L]
 RewriteRule ^(.)-f-([0-9]+)-([a-z]+)(-|-[a-z]+)-([0-9]+)-([0-9]+).html(.)$ forumdisplay.php?fid=$2&sortby=$3&order=$4&datecut=$5&page=$6$7
 RewriteRule ^(.*)-a-([0-9]+).html$ announcements.php?aid=$2Una volta salvato il file .htaccess avrai una situazione come questa dove puoi vedere che posizionandoti su una sezione l?url viene riscritta  
  
 
- 
							
							
							
							
							
Cionfs complimenti veramente una bellissima guida comunque volevo chiederti ora ho l'url scritto ad esempio: /forum-15.html se io volessi ad esempio farlo diventare cosi /forum-presentazioni.html come è possibile? 
 
- 
							
							
							
							
							
Grazie per i complimenti  Utilizzando quel plugin puoi riscrivere l'url in quel modo 
 
- 
							
							
							
							
							
@cionfs said: puoi riscrivere l'url in quel modo come è possibile? cosa devo modificare di preciso?:? 
 
- 
							
							
							
							
							
Il file htaccess  Modificandolo opportunamente. Modificandolo opportunamente.Inoltre dovresti modificare il RewriteBase che dovrebbe essere "RewriteBase /forum" se hai il forum in una sottocartella  
 
- 
							
							
							
							
							
@cionfs said: Il file htaccess  Modificandolo opportunamente. Modificandolo opportunamente.
 Ciao, io ora come ora ho il file htaccess in questo modo: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 RewriteBase / 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-([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> # //seo_mod_start # Uncomment the following and add your forum path if rewrites arent working properly #RewriteBase /mybb/ RewriteRule ^index.html$ index.php [L,NE] RewriteRule ^(.*)-t-([0-9]+).html(.*)$ showthread.php?tid=$2$3 [QSA,L] RewriteRule ^(.*)-t-([0-9]+)-([0-9]+).html$ showthread.php?tid=$2&page=$3 [QSA,L] RewriteRule ^(.*)-f-([0-9]+).html(.*)$ forumdisplay.php?fid=$2$3 [QSA,L] RewriteRule ^(.*)-u-([0-9]+).html$ member.php?action=profile&uid=$2 [QSA,L] RewriteRule ^members/(.*)-([0-9]+).html$ member.php?action=profile&uid=$2 [QSA,L] RewriteRule ^(.*)/(.*)-f-([0-9]+).html(.*)$ forumdisplay.php?fid=$2$3 [QSA,L] RewriteRule ^(.*)-f-([0-9]+)-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&page=$3 [QSA,L] RewriteRule ^(.*)-f-([0-9]+)-([a-z]+)(-|-[a-z]+)-([0-9]+)-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&sortby=$3&order=$4&datecut=$5&page=$6$7 RewriteRule ^(.*)-a-([0-9]+).html$ announcements.php?aid=$2 # //seo_mod_endlo devo modificare? @cionfs said: Inoltre dovresti modificare il RewriteBase che dovrebbe essere "RewriteBase /forum" se hai il forum in una sottocartella  
 Dove trovo il file RewriteBase? Comunque il forum ce l'ho nella ROOT Comunque il forum ce l'ho nella ROOTGrazie 
 
- 
							
							
							
							
							
Allora fai il backup dell'htaccess che hai e mettilo da parte. Sostituiscilo con questo RewriteEngine On #RewriteBase /mybb/ RewriteRule ^index.html$ index.php [L,NE] RewriteRule ^(.*)-t-([0-9]+).html(.*)$ showthread.php?tid=$2$3 [QSA,L] RewriteRule ^(.*)-t-([0-9]+)-([0-9]+).html$ showthread.php?tid=$2&page=$3 [QSA,L] RewriteRule ^(.*)-f-([0-9]+).html(.*)$ forumdisplay.php?fid=$2$3 [QSA,L] RewriteRule ^(.*)-u-([0-9]+).html$ member.php?action=profile&uid=$2 [QSA,L] RewriteRule ^members/(.*)-([0-9]+).html$ member.php?action=profile&uid=$2 [QSA,L] RewriteRule ^(.*)/(.*)-f-([0-9]+).html(.*)$ forumdisplay.php?fid=$2$3 [QSA,L] RewriteRule ^(.*)-f-([0-9]+)-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&page=$3 [QSA,L] RewriteRule ^(.*)-f-([0-9]+)-([a-z]+)(-|-[a-z]+)-([0-9]+)-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&sortby=$3&order=$4&datecut =$5&page=$6$7 RewriteRule ^(.*)-a-([0-9]+).html$ announcements.php?aid=$2
 
- 
							
							
							
							
							
@cionfs said: Allora fai il backup dell'htaccess che hai e mettilo da parte. Sostituiscilo con questo Ciao, sostituendo con il file htaccess che mi hai dato non mi funziona e mi dà questo errore: Code 500 > Violazione policy o htaccess errato! - Policy violation or wrong htaccess! [CENTER] 
 Nel 99% dei casi controlla il contenuto del tuo file .htaccess, spesso puo' contenere direttive o regole sbagliate o non supportate[LEFT]Non è che forse dovrebbe esserci questo: # //seo_mod_start # Uncomment the following and add your forum path if rewrites arent working properly #RewriteBase /mybb/ RewriteRule ^index.html$ index.php [L,NE] RewriteRule ^(.*)-t-([0-9]+).html(.*)$ showthread.php?tid=$2$3 [QSA,L] RewriteRule ^(.*)-t-([0-9]+)-([0-9]+).html$ showthread.php?tid=$2&page=$3 [QSA,L] RewriteRule ^(.*)-f-([0-9]+).html(.*)$ forumdisplay.php?fid=$2$3 [QSA,L] RewriteRule ^(.*)-u-([0-9]+).html$ member.php?action=profile&uid=$2 [QSA,L] RewriteRule ^members/(.*)-([0-9]+).html$ member.php?action=profile&uid=$2 [QSA,L] RewriteRule ^(.*)/(.*)-f-([0-9]+).html(.*)$ forumdisplay.php?fid=$2$3 [QSA,L] RewriteRule ^(.*)-f-([0-9]+)-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&page=$3 [QSA,L] RewriteRule ^(.*)-f-([0-9]+)-([a-z]+)(-|-[a-z]+)-([0-9]+)-([0-9]+).html(.*)$ forumdisplay.php?fid=$2&sortby=$3&order=$4&datecut=$5&page=$6$7 RewriteRule ^(.*)-a-([0-9]+).html$ announcements.php?aid=$2 # //seo_mod_endCiao e Grazie  
 [/LEFT]
 [/CENTER]
 
- 
							
							
							
							
							
Potrebbe, l'unica cosa che puoi fare è provare  
 
- 
							
							
							
							
							
@cionfs said: Potrebbe, l'unica cosa che puoi fare è provare  
 OK, ma perchè con quello che ho ora non va bene?
 
- 
							
							
							
							
							
Se ti riferisci al primo è perchè il rewrite viene effettuato due volte  Mi spiego meglio. E' inserito il rewrite per i thread sia all'inizio che alla fine dell'htaccess in maniera diversa 
 
- 
							
							
							
							
							
@cionfs said: Se ti riferisci al primo è perchè il rewrite viene effettuato due volte  Mi spiego meglio. E' inserito il rewrite per i thread sia all'inizio che alla fine dell'htaccess in maniera diversa 
 Il secondo che ho posta va bene quindi dici che è ok se utilizzo quello?
 
- 
							
							
							
							
							
Se ti riferisci a questo [php] //seo_mod_startUncomment the following and add your forum path if rewrites arent working properly#RewriteBase /mybb/ RewriteRule ^index.html$ index.php [L,NE] RewriteRule ^(.)-t-([0-9]+).html(.)$ showthread.php?tid=$2$3 [QSA,L] RewriteRule ^(.*)-t-([0-9]+)-([0-9]+).html$ showthread.php?tid=$2&page=$3 [QSA,L] RewriteRule ^(.)-f-([0-9]+).html(.)$ forumdisplay.php?fid=$2$3 [QSA,L] RewriteRule ^(.*)-u-([0-9]+).html$ member.php?action=profile&uid=$2 [QSA,L] RewriteRule ^members/(.*)-([0-9]+).html$ member.php?action=profile&uid=$2 [QSA,L] RewriteRule ^(.)/(.)-f-([0-9]+).html(.*)$ forumdisplay.php?fid=$2$3 [QSA,L] RewriteRule ^(.)-f-([0-9]+)-([0-9]+).html(.)$ forumdisplay.php?fid=$2&page=$3 [QSA,L] RewriteRule ^(.)-f-([0-9]+)-([a-z]+)(-|-[a-z]+)-([0-9]+)-([0-9]+).html(.)$ forumdisplay.php?fid=$2&sortby=$3&order=$4&datecut=$5&page=$6$7 RewriteRule ^(.*)-a-([0-9]+).html$ announcements.php?aid=$2 //seo_mod_end[/php]Credo vada bene 
 
- 
							
							
							
							
							
@cionfs said: Credo vada bene  
 Ok grazie 1000 per il supporto ;):)
 
- 
							
							
							
							
							
Figurati  Fammi sapere se funge tutto  
 
- 
							
							
							
							
							
@cionfs said: Fammi sapere se funge tutto  
 rieccomi come da aspettative :D:DNon riesco ad accedere nelle varie sezioni  
 
- 
							
							
							
							
							
In che senso? Puoi vedere i profili utenti, i topic ma non le sezioni? Su che livello è installato il forum? Secondo, terzo, sottocartella?  
 
- 
							
							
							
							
							
@cionfs said: In che senso? Puoi vedere i profili utenti, i topic ma non le sezioni? Su che livello è installato il forum? Secondo, terzo, sottocartella?  
 Visualizzo solo la home del forum.il forum non ha nessuna sottocartella è nella home 
 
- 
							
							
							
							
							
Nel file htaccess non c'è questa riga, vero? [php] 
 Options -MultiViews +FollowSymlinks -Indexes
 [/php]
 
- 
							
							
							
							
							
@cionfs said: Nel file htaccess non c'è questa riga, vero? [php] 
 Options -MultiViews +FollowSymlinks -Indexes
 [/php]
 in quale htaccess?