Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    [url_rewrite] htaccess per certi url del forum (.msg, #new)

    L'htaccess in questione è funzionante, ma non riesce a riscrivermi alcuni url del forum, come:

    http://www.sito.com/forum/index.php?...cseen#msg36991
    http://www.sito.com/forum/index.php?...0.msg36992#new
    http://www.sito.com/forum/index.php?...36968#msg36968

    Me li riscrive sempre così, ad esempio:
    http://www.sito.com/forum/topic,750.0.html

    Magari ci scriverò sopra un aggornamento corposo di questa mod (SEO4SMF) per smf, una mano è gradita.

    codice:
    RewriteEngine on
    
    RewriteBase /forum
    
    #Archive/Sitemaps
    RewriteRule ^sitemaps-([a-zA-Z0-9-]*)\.html index.php?dummy=1&action=seo4smfsitemaps&sa=$1 [L]
    
    RewriteCond %{REQUEST_METHOD} =GET
    RewriteCond %{QUERY_STRING} ^action=(.*)$
    RewriteRule  ^(.*)$ seo4smf-redirect.php?a=%1 [R=301,L]
    
    RewriteCond %{QUERY_STRING} ^topic=([0-9]*)$
    RewriteRule  ^(.*)$ seo4smf-redirect.php?t=%1 [R=301,L]
    
    RewriteCond %{QUERY_STRING} ^topic=([0-9]*).([0-9]*)
    RewriteRule  ^(.*)$ seo4smf-redirect.php?t=%1.%2 [R=301,L]
    
    RewriteCond %{QUERY_STRING} ^board=([0-9]*).([0-9]*)
    RewriteRule  ^(.*)$ seo4smf-redirect.php?b=%1 [R=301,L]
    
    RewriteCond %{QUERY_STRING} ^action=profile;u=([0-9]*);(.*)$
    RewriteRule  ^(.*)$ seo4smf-redirect.php?u=%1;param=%2 [R=301,L]
    
    RewriteCond %{QUERY_STRING} ^action=profile;u=([0-9]*)
    RewriteRule  ^(.*)$ seo4smf-redirect.php?u=%1 [R=301,L]
    
    #Tiny Portal Old Url's
    RewriteCond %{QUERY_STRING} ^page=([0-9]*)
    RewriteRule  ^(.*)$ seo4smf-redirect.php?p=%1 [R=301,L]
    
    #Rewrite Old urls
    RewriteRule  ^index.php/board,(.*).html seo4smf-redirect.php?b=$1 [R=301,L]
    RewriteRule  ^index.php/board,(.*).html;(.*) seo4smf-redirect.php?b=$1&o=$2 [R=301,L]
    
    RewriteRule  ^index.php/topic,(.*).html seo4smf-redirect.php?t=$1 [R=301,L]
    RewriteRule  ^index.php/topic,(.*).html;(.*) seo4smf-redirect.php?t=$1&o=$2 [R=301,L]
    
    #Bad Url's
    RewriteRule  ^(.*)/-t(.*).html seo4smf-redirect.php?t=$2 [R=301,L]
    RewriteRule  ^-b(.*)/$ seo4smf-redirect.php?b=$1 [R=301,L]
    RewriteRule  ^-b(.*)/(.*)$ seo4smf-redirect.php?b=$1 [R=301,L]
    RewriteRule  ^(.*)/-b(.*)/$ seo4smf-redirect.php?b=$2 [R=301,L]
    RewriteRule ^tpmod.html&(.*)$ /index.php?action=tpmod;dl=item31 [L]
    
    #New board URL's
    RewriteRule ^(.*)board,([0-9]*)\.([0-9]*)\.html;(.*) index.php?dummy=1&board=$2.$3&$4 [L]
    RewriteRule ^(.*)board,([0-9]*)\.([0-9]*)\.html$ index.php?dummy=2&board=$2.$3 [L]
    RewriteRule ^(.*)board,([0-9]*)\.([0-9])\.html$ index.php?dummy=2&board=$2.$3 [L]
    
    #New topic URL's
    RewriteRule ^(.*)topic,([0-9]*)\.([0-9]*)\.html;((\?:from|msg|new)[0-9]*);(.*)$ index.php?dummy=1&topic=$2.$4&$6 [L]
    RewriteRule ^(.*)topic,([0-9]*)\.([0-9]*)\.html;((\?:from|msg|new)[0-9]*) index.php?dummy=1&topic=$2.$4 [L]
    RewriteRule ^(.*)topic,([0-9]*)\.([0-9]*)\.html;(.*)$ index.php?dummy=1&topic=$2.$3&$4 [L]
    RewriteRule ^(.*)topic,([0-9]*)\.([0-9]*)\.html$ index.php?dummy=1&topic=$2.$3 [L]
    
    #New profiles URL's
    RewriteRule ^(.*)-u([0-9]*)\.html;sa,(.*);start,([0-9]*);delete,([0-9]*);sesc,([a-z0-9]*)$ index.php?dummy=1&action=profile;u=$2;sa=$3;start=$4;delete=$5;sesc=$6 [L]
    RewriteRule ^(.*)-u([0-9]*)\.html;sa,(.*);start,([0-9]*)$ index.php?dummy=1&action=profile;u=$2;sa=$3;start=$4 [L]
    RewriteRule ^(.*)-u([0-9]*)\.html;sa,(.*)$ index.php?dummy=1&action=profile;u=$2;sa=$3 [L]
    RewriteRule ^(.*)-u([0-9]*)\.html index.php?dummy=1&action=profile;u=$2 [L]
    
    #New Tinyportal Articles URL's
    RewriteRule ^(.*)-p([0-9]*)\.html index.php?dummy=1&page=$2 [L]
    
    #New action Url's
    RewriteRule ^(.*)\.html(.*)$ index.php?dummy=1;action=$1;$2 [L]
    RewriteRule ^(.*)\.html$ index.php?dummy=1;action=$1 [L]
    
    #Sitemaps
    RewriteRule sitemap.xml sitemaps.php [L]
    RewriteRule urllist.txt urllist.php [L]
    Altro problema, non si riesce a sfogliare le pagine di una sezione (board), perchè mi punta sempre alla prima.

    Penso che con ogni probabilità, si tratti di questa porzione di codice da modificare:

    codice:
    RewriteCond %{QUERY_STRING} ^board=([0-9]*).([0-9]*)
    RewriteRule  ^(.*)$ seo4smf-redirect.php?b=%1 [R=301,L]
    Ho provato così ma non è sufficiente:

    codice:
    RewriteCond %{QUERY_STRING} ^board=([0-9]*).([0-9]*)
    RewriteRule  ^(.*)$ seo4smf-redirect.php?b=%1.%2 [R=301,L]
    http://paynegame.altervista.org

  2. #2
    Purtroppo il tempo è lavoro, le vacanze finiscono e vorrei saperne quanto prima.
    http://paynegame.altervista.org

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.