- Home
- Categorie
- La Community Connect.gt
- Tutto sulla Community
- [phpBB] Topic title nell'url tramite mod_rewrite
-
@Tuonorosso said:
il codice di cosa?
Purtroppo non mi ricordo piu che mod ho usato.. :bho:
Pensavo avessi due page_tail.php
Fa niente, provo con un altro mod e vi faccio sapere
-
non ho capito niente di tutta questa discussione..
troppo complicata !In definitiva per chi ha una 2.0.19 con subSilvers cosa deve installare per far funzionare il mod rewrite?
Mi linkate la mod giusta per favore ?
-
[url=http://www.antiworld.biz/antiworld/files/phpBB-google-keyword-URLs.txt]Facile, basta voler leggere la prima pagina
Posta qui i problemi riscontrati
-
scusate ma non capisco come state andando avanti.
io ho sostituito la pagina che vi ho detto pochi post fa e tutto funziona senza rovinare il template... a voi qualcosa non va?
-
in .htaccess
dove va aggiunta questa parte?
RewriteEngine On #this may cause issues with subdirs and so I have not enabled it. RewriteBase / RewriteRule [.]*-vf([0-9]*) viewforum.php?%{QUERY_STRING}&f=$1 RewriteRule [.]*-vp([0-9]*) viewtopic.php?%{QUERY_STRING}&p=$1 RewriteRule [.]*-vt([0-9]*) viewtopic.php?%{QUERY_STRING}&t=$1 RewriteRule [.]*-vc([0-9]*) index.php?%{QUERY_STRING}&c=$1 RewriteRule [.]*-ac([0-9]*) album_cat.php?%{QUERY_STRING}&cat_id=$1 RewriteRule [.]*-at([0-9]*) album_thumbnail.php?%{QUERY_STRING}&pic_id=$1 RewriteRule [.]*-apic([0-9]*) album_pic.php?%{QUERY_STRING}&pic_id=$1 RewriteRule [.]*-apm([0-9]*) album_picm.php?%{QUERY_STRING}&pic_id=$1 RewriteRule [.]*-full-asp([0-9]*) album_showpage.php?full=&pic_id=$1 RewriteRule [.]*-asp([0-9]*) album_showpage.php?%{QUERY_STRING}&pic_id=$1 RewriteRule [.]*-aper([0-9]*) album_personal.php?%{QUERY_STRING}&user_id=$1 RewriteRule [.]*-dc([0-9]*) dload.php?%{QUERY_STRING}action=category&cat_id=$1 RewriteRule [.]*-df([0-9]*) dload.php?%{QUERY_STRING}action=file&file_id=$1 RewriteRule [.]*-kbc([0-9]*) kb.php?%{QUERY_STRING}mode=cat&cat=$1 RewriteRule [.]*-kba([0-9]*) kb.php?%{QUERY_STRING}mode=article&k=$1 RewriteRule [.]*-kbsmp kb.php?mode=stats&stats=mostpopular RewriteRule [.]*-kbstr kb.php?mode=stats&stats=toprated RewriteRule [.]*-kbsl kb.php?mode=stats&stats=latest RewriteRule [.]*-pbc([0-9]*) kb.php?%{QUERY_STRING}mode=cat&cat=$1 RewriteRule [.]*-pa([0-9]*) kb.php?%{QUERY_STRING}mode=article&k=$1 RewriteRule [.]*-psmp kb.php?mode=stats&stats=mostpopular RewriteRule [.]*-pstr kb.php?mode=stats&stats=toprated RewriteRule [.]*-pbsl kb.php?mode=stats&stats=latest
-
in page_header.php mi dice di trovare questo:
// // gzip_compression // $do_gzip_compress = FALSE; if($board_config['gzip_compress']) { $phpver = phpversion(); if($phpver >= "4.0.4pl1") { if(extension_loaded("zlib")) { if (headers_sent() != TRUE) { $gz_possible = isset($HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"]) && eregi("gzip, deflate",$HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"]); if ($gz_possible) ob_start("ob_gzhandler"); } } } else if($phpver > "4.0") { if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip')) { if(extension_loaded("zlib")) { $do_gzip_compress = TRUE; ob_start(); ob_implicit_flush(0); header("Content-Encoding: gzip"); } } } }
ma io invece nel file ho questo:
// // gzip_compression // $do_gzip_compress = FALSE; if ( $board_config['gzip_compress'] ) { $phpver = phpversion(); $useragent = (isset($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) ? $HTTP_SERVER_VARS['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT'); if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) ) { if ( extension_loaded('zlib') ) { ob_start('ob_gzhandler'); } } else if ( $phpver > '4.0' ) { if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') ) { if ( extension_loaded('zlib') ) { $do_gzip_compress = TRUE; ob_start(); ob_implicit_flush(0); header('Content-Encoding: gzip'); } } } }
cosa devo fare?
-
@Rinzi said:
scusate ma non capisco come state andando avanti.
io ho sostituito la pagina che vi ho detto pochi post fa e tutto funziona senza rovinare il template... a voi qualcosa non va?
Si, mi dà un 404, ho un template strano. Cambio con il SubSilver e vedo un attimino.
-
@Rinzi said:
scusate ma non capisco come state andando avanti.
io ho sostituito la pagina che vi ho detto pochi post fa e tutto funziona senza rovinare il template... a voi qualcosa non va?
Rinzi, io ti ho dato la soluzione per non dover mettere i tpl del subsilver in quanto avrai il problema anche nella index immagino, e se metti l'index_body .tpl di subsilver ti sballa un po di cosette
-
mi aiutate anche a me per favore?
-
@alive said:
in .htaccess
dove va aggiunta questa parte?
RewriteEngine On #this may cause issues with subdirs and so I have not enabled it. RewriteBase / RewriteRule [.]*-vf([0-9]*) viewforum.php?%{QUERY_STRING}&f=$1 RewriteRule [.]*-vp([0-9]*) viewtopic.php?%{QUERY_STRING}&p=$1 RewriteRule [.]*-vt([0-9]*) viewtopic.php?%{QUERY_STRING}&t=$1 RewriteRule [.]*-vc([0-9]*) index.php?%{QUERY_STRING}&c=$1 RewriteRule [.]*-ac([0-9]*) album_cat.php?%{QUERY_STRING}&cat_id=$1 RewriteRule [.]*-at([0-9]*) album_thumbnail.php?%{QUERY_STRING}&pic_id=$1 RewriteRule [.]*-apic([0-9]*) album_pic.php?%{QUERY_STRING}&pic_id=$1 RewriteRule [.]*-apm([0-9]*) album_picm.php?%{QUERY_STRING}&pic_id=$1 RewriteRule [.]*-full-asp([0-9]*) album_showpage.php?full=&pic_id=$1 RewriteRule [.]*-asp([0-9]*) album_showpage.php?%{QUERY_STRING}&pic_id=$1 RewriteRule [.]*-aper([0-9]*) album_personal.php?%{QUERY_STRING}&user_id=$1 RewriteRule [.]*-dc([0-9]*) dload.php?%{QUERY_STRING}action=category&cat_id=$1 RewriteRule [.]*-df([0-9]*) dload.php?%{QUERY_STRING}action=file&file_id=$1 RewriteRule [.]*-kbc([0-9]*) kb.php?%{QUERY_STRING}mode=cat&cat=$1 RewriteRule [.]*-kba([0-9]*) kb.php?%{QUERY_STRING}mode=article&k=$1 RewriteRule [.]*-kbsmp kb.php?mode=stats&stats=mostpopular RewriteRule [.]*-kbstr kb.php?mode=stats&stats=toprated RewriteRule [.]*-kbsl kb.php?mode=stats&stats=latest RewriteRule [.]*-pbc([0-9]*) kb.php?%{QUERY_STRING}mode=cat&cat=$1 RewriteRule [.]*-pa([0-9]*) kb.php?%{QUERY_STRING}mode=article&k=$1 RewriteRule [.]*-psmp kb.php?mode=stats&stats=mostpopular RewriteRule [.]*-pstr kb.php?mode=stats&stats=toprated RewriteRule [.]*-pbsl kb.php?mode=stats&stats=latest
in testa al file che salerai nella home directory del forum
-
ma il file in questione non si trova nella cartella cache ?
-
@alive said:
ma il file in questione non si trova nella cartella cache ?
No.
Deve andare nella root del forum
cartellaforum/ > tuo file
-
@Giorgiotave said:
No.
Deve andare nella root del forum
cartellaforum/ > tuo file
Nella root principale questo file non c'è.
Devo andare ad aprire quello nella cartella cache, modificarlo aggiungendo all'inizio del file quelle righe e poi salvarlo nella root principale?
Oppure lo devo proprio andare a creare e metterci dentro solo ed esclusivamente quelle righe ?
-
@alive said:
Oppure lo devo proprio andare a creare e metterci dentro solo ed esclusivamente quelle righe ?
lo devi creare ...
-
Ok !
E per quell'altro problema ?
in page_header.php mi dice di trovare questo:
// // gzip_compression // $do_gzip_compress = FALSE; if($board_config['gzip_compress']) { $phpver = phpversion(); if($phpver >= "4.0.4pl1") { if(extension_loaded("zlib")) { if (headers_sent() != TRUE) { $gz_possible = isset($HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"]) && eregi("gzip, deflate",$HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"]); if ($gz_possible) ob_start("ob_gzhandler"); } } } else if($phpver > "4.0") { if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip')) { if(extension_loaded("zlib")) { $do_gzip_compress = TRUE; ob_start(); ob_implicit_flush(0); header("Content-Encoding: gzip"); } } } }
ma io invece nel file ho questo:
// // gzip_compression // $do_gzip_compress = FALSE; if ( $board_config['gzip_compress'] ) { $phpver = phpversion(); $useragent = (isset($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) ? $HTTP_SERVER_VARS['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT'); if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) ) { if ( extension_loaded('zlib') ) { ob_start('ob_gzhandler'); } } else if ( $phpver > '4.0' ) { if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') ) { if ( extension_loaded('zlib') ) { $do_gzip_compress = TRUE; ob_start(); ob_implicit_flush(0); header('Content-Encoding: gzip'); } } } }
cosa devo fare?
-
@alive said:
cosa devo fare?
sicuramente una versione del MOD vecchiotta, sostituisci il codice che hai trovato
-
ok e per vedere se funziona tutto pefettamente ?
-
cosa ne dite di questo?
melgio o peggio ?############################################################## ## MOD Title: phpBB static URLs mod_rewrite 1.0.0 ## MOD Author: Craven de Kere (N/A) http://www.Able2Know.com ## MOD Description: This mod should be added AFTER the Able2Know.com SEO mod ## This mod makes static URLs (only for guests) for phpBB, for example topic-22234.html ## Please read the author notes BEFORE using this mod. ## Check http://www.able2know.com/forums/about15132.html ## for the latest version or to get help with this MOD ## ## MOD Version: 1.0.0 ## ## Installation Level: (Advanced) ## Installation Time: 5 Minutes ## Files To Edit: page_header.php, ## Included Files: n/a ############################################################## ## Author Notes: ## Use this mod together with the Able2Know.com SEO Mod (http://www.able2know.com/forums/about15132.html) ## Make backups and test this on a test forum if you can. This is not a typical mod. ## For an additional tutorial on preventing IP addresses from being logged see: ## http://www.able2know.com/forums/about22586.html ## ############################################################## ## MOD History: ## ## 2004-04-10 - Version 1.0.0 ## - Initial public release. ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ OPEN ]------------------------------------------ # includes/page_header.php # #-----[ FIND ]------------------------------------------ # // // Generate logged in/logged out status // # #-----[ AFTER, ADD ]------------------------------------------ # if ( !$userdata['session_logged_in'] ) { ob_start(); function replace_for_mod_rewrite(&$s) { $urlin = array( "'(?<!/)viewforum.php\?f=([0-9]*)&topicdays=([0-9]*)&start=([0-9]*)'", "'(?<!/)viewforum.php\?f=([0-9]*)&mark=topics'", "'(?<!/)viewtopic.php\?t=([0-9]*)&watch=topic*'", "'(?<!/)viewtopic.php\?t=([0-9]*)&unwatch=topic*'", "'(?<!/)viewtopic.php\?t=([0-9]*)&highlight=*'", "'(?<!/)viewforum.php\?f=([0-9]*)'", "'(?<!/)viewtopic.php\?t=([0-9]*)&view=previous'", "'(?<!/)viewtopic.php\?t=([0-9]*)&view=next'", "'(?<!/)viewtopic.php\?t=([0-9]*)&postdays=([0-9]*)&postorder=([a-zA-Z]*)&vote=viewresult'", "'(?<!/)viewtopic.php\?t=([0-9]*)&postdays=([0-9]*)&postorder=([a-zA-Z]*)&start=([0-9]*)'", "'(?<!/)viewtopic.php\?t=([0-9]*)&start=([0-9]*)&postdays=([0-9]*)&postorder=([a-zA-Z]*)&highlight=([a-zA-Z0-9]*)'", "'(?<!/)viewtopic.php\?t=([0-9]*)&start=([0-9]*)'", "'(?<!/)viewtopic.php\?t=([0-9]*)'", "'(?<!/)viewtopic.php&p=([0-9]*)'", "'(?<!/)viewtopic.php\?p=([0-9]*)'", ); $urlout = array( "topic-\\1-\\2-\\3.html", "mark-forum\\1.html", "updates-topic\\1.html", "stop-updates-topic\\1.html", "about\\1.html&highlight=\\2", "forum-\\1.html", "ptopic\\1.html", "ntopic\\1.html", "view-poll\\1-\\2-\\3.html", "about\\1-\\2-\\3-\\4.html", "about\\1.html", "about\\1-\\2.html", "about\\1.html", "post-\\1.html", "post-\\1.html", ); $s = preg_replace($urlin, $urlout, $s); return $s; } } # #-----[ OPEN ]------------------------------------------ # includes/page_tail.php # #-----[ FIND ]------------------------------------------ # $db->sql_close(); # #-----[ AFTER, ADD ]------------------------------------------ # if ( !$userdata['session_logged_in'] ) { $contents = ob_get_contents(); ob_end_clean(); echo replace_for_mod_rewrite($contents); global $dbg_starttime; } # #-----[ OPEN ]------------------------------------------ # .htaccess # #-----[ ADD ]------------------------------------------ # RewriteEngine On RewriteRule ^forums.* index.php [L,NC] RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?p=$1&highlight=$2 [L,NC] RewriteRule ^post-([0-9]*).* viewtopic.php?p=$1 [L,NC] RewriteRule ^view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult [L,NC] RewriteRule ^about([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?t=$1&highlight=$2 [L,NC] RewriteRule ^about([0-9]*).html&view=newest viewtopic.php?t=$1&view=newest [L,NC] RewriteRule ^about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,NC] RewriteRule ^about([0-9]*)-([0-9]*).* viewtopic.php?t=$1&start=$2 [L,NC] RewriteRule ^about([0-9]*).* viewtopic.php?t=$1 [L,NC] RewriteRule ^about([0-9]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC] RewriteRule ^mark-forum([0-9]*).html* viewforum.php?f=$1&mark=topics [L,NC] RewriteRule ^updates-topic([0-9]*).html* viewtopic.php?t=$1&watch=topic [L,NC] RewriteRule ^stop-updates-topic([0-9]*).html* viewtopic.php?t=$1&unwatch=topic [L,NC] RewriteRule ^forum-([0-9]*).html viewforum.php?f=$1 [L,NC] RewriteRule ^forum-([0-9]*).* viewforum.php?f=$1 [L,NC] RewriteRule ^topic-([0-9]*)-([0-9]*)-([0-9]*).* viewforum.php?f=$1&topicdays=$2&start=$3 [L,NC] RewriteRule ^ptopic([0-9]*).* viewtopic.php?t=$1&view=previous [L,NC] RewriteRule ^ntopic([0-9]*).* viewtopic.php?t=$1&view=next [L,NC] # #-----[ OPEN ]------------------------------------------ # robots.txt Disallow: forums/post-*.html$ Disallow: forums/updates-topic.html*$ Disallow: forums/stop-updates-topic.html*$ Disallow: forums/ptopic*.html$ Disallow: forums/ntopic*.html$ # #-----[ OPEN ]------------------------------------------ # includes/functions.php # #-----[ FIND ]------------------------------------------ # if (!empty($db)) { $db->sql_close(); } # #-----[ AFTER, ADD ]------------------------------------------ # if ( !$userdata['session_logged_in'] ) { if (stristr($url, 'http://')) { header('Location: ' . $url); exit; } } # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM
-
@alive said:
ok e per vedere se funziona tutto pefettamente ?
Fai il backup di quei due file e poi uppi tutto sul server
-
non mi funziona mi da quest'errore
Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php:34) in /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_tail.php on line 100 Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php:34) in /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_tail.php on line 101 Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php:34) in /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_tail.php on line 102 Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php:34) in /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php on line 739 Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php:34) in /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php on line 745 Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php:34) in /web/htdocs/www.clubmusiclovers.com/home/community/includes/page_header.php on line 746