Re-ecriture d URL : Forums
| 1 - Sommaire |
Dernière mise à jour le : 02 novembre 2006
Tout le nécessaire à la réécriture d'URL pour le module Forum.
Cela nécessite d'avoir le mod_rewrite d'activé chez votre hébergeur. |
|
| 2 - htaccess |
#Forums
RewriteRule ^forum-sujet([0-9]*).html modules.php?name=@@@Forums&file=viewtopic&t=$1
RewriteRule ^forumx([0-9]+)-([0-9]+)-([0-9]+).html modules.php?name=@@@Forums&file=viewforum&f=$1&topicdays=$2&start=$3
RewriteRule ^forum([1-9][0-9]*)-(mark|start)([a-zA-Z0-9_]*).html modules.php?name=@@@Forums&file=viewforum&f=$1&$2=$3
RewriteRule ^forum([1-9][0-9]*).* modules.php?name=@@@Forums&file=viewforum&f=$1
RewriteRule ^postx([0-9]+)-([0-9]+)-([0-9]+).html modules.php?name=@@@Forums&file=viewtopic&t=$1&start=$2&postdays=$3&postorder=asc&highlight=
RewriteRule ^postxf([0-9]+)-([0-9]+)-([0-9]+).html modules.php?name=@@@Forums&file=viewtopic&t=$1&postdays=$2&postorder=asc&start=$3
RewriteRule ^posts([0-9]*)-(start|view|highlight)([[:punct:]/:-'(){}.&=_a-zA-Z0-9 ]*).html modules.php?name=@@@Forums&file=viewtopic&t=$1&$2=$3
RewriteRule ^topic([1-9][0-9]*)-([a-zA-Z0-9]*).html modules.php?name=@@@Forums&file=viewtopic&t=$1&$2=topic&start=0
RewriteRule ^post(p|t)([1-9][0-9]*).* modules.php?name=@@@Forums&file=viewtopic&$1=$2
RewriteRule ^register-coppa-([a-zA-Z0-9_]*).html modules.php?name=@@@Forums&file=profile&mode=register&agreed=true&coppa=$1
RewriteRule ^register-([a-zA-Z0-9_]*).html modules.php?name=@@@Forums&file=profile&mode=register&agreed=$1
RewriteRule ^poster([a-zA-Z0-9_]*)-([0-9_&]*)_([a-zA-Z0-9_&=[:punct:].;]*).html modules.php?name=@@@Forums&file=modcp&mode=$1&p=$2&t=$3
RewriteRule ^modcp([0-9]*)-([a-zA-Z0-9]*).html modules.php?name=@@@Forums&file=modcp&t=$1&mode=$2
RewriteRule ^forums-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([0-9]*)-([1-9][0-9]*).html modules.php?name=@@@Forums&file=$1&mode=$2&t=$3&popup=$4
RewriteRule ^forums-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-(p|t|f|u|popup)-([0-9]*).html modules.php?name=@@@Forums&file=$1&mode=$2&$3=$4
RewriteRule ^forums-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*).html modules.php?name=@@@Forums&file=$1&mode=$2
RewriteRule ^forum([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*).html modules.php?name=@@@Forums&file=search&$1=$2&$3=$4
RewriteRule ^forums([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*).html modules.php?name=@@@Forums&file=$1&$2=$3
RewriteRule ^forums.html modules.php?name=@@@Forums&file=index
RewriteRule ^forum-([a-zA-Z0-9_]*).html modules.php?name=@@@Forums&file=$1
RewriteRule ^forums.html modules.php?name=@@@Forums |
|
|
|
| 3 - header.php |
Dans la partie $urlin = array( :
// forums
"'(?<!/)modules.php?name=@@@Forums&file=viewtopic&t=([0-9]*)'",
"'(?<!/)modules.php?name=@@@Forums&file=viewforum&f=([0-9]+)&topicdays=([0-9]+)&start=([0-9]+)'",
"'(?<!/)modules.php?name=@@@Forums&file=viewforum&f=([0-9]*)&(mark|start)=([a-zA-Z0-9_]*)'",
"'(?<!/)modules.php?name=@@@Forums&file=viewforum&f=([0-9]*)'",
"'(?<!/)modules.php?name=@@@Forums&file=viewtopic&t=([0-9]+)&start=([0-9]+)&postdays=([0-9]+)&postorder=asc&highlight='",
"'(?<!/)modules.php?name=@@@Forums&file=viewtopic&t=([0-9]+)&postdays=([0-9]+)&postorder=asc&start=([0-9]+)'",
"'(?<!/)modules.php?name=@@@Forums&file=viewtopic&t=([0-9]*)&(start|view|highlight)=([/:-'(){}.&=_a-zA-Z0-9 ]*)'",
"'(?<!/)modules.php?name=@@@Forums&file=viewtopic&t=([0-9]*)&([a-zA-Z0-9]*)=topic&start=0'",
"'(?<!/)modules.php?name=@@@Forums&file=viewtopic&(p|t)=([0-9]*)'",
"'(?<!/)modules.php?name=@@@Forums&file=profile&mode=register&agreed=true&coppa=([a-zA-Z0-9_]*)'",
"'(?<!/)modules.php?name=@@@Forums&file=profile&mode=register&agreed=([a-zA-Z0-9_]*)'",
"'(?<!/)modules.php?name=@@@Forums&file=modcp&mode=([a-zA-Z0-9_]*)&p=([0-9_&]*)&t=([a-zA-Z0-9_&=.;]*)'",
"'(?<!/)modules.php?name=@@@Forums&file=modcp&t=([0-9]*)&mode=([a-zA-Z0-9]*)'",
"'(?<!/)modules.php?name=@@@Forums&file=([a-zA-Z0-9_]*)&mode=([a-zA-Z0-9_]*)&t=([0-9]*)&popup=([0-9]*)'",
"'(?<!/)modules.php?name=@@@Forums&file=([a-zA-Z0-9_]*)&mode=([a-zA-Z0-9_]*)&(p|t|f|u|popup)=([0-9]*)'",
"'(?<!/)modules.php?name=@@@Forums&file=([a-zA-Z0-9_]*)&mode=([a-zA-Z0-9_]*)&(p|t|f|u|popup)=([0-9]*)'",
"'(?<!/)modules.php?name=@@@Forums&file=([a-zA-Z0-9_]*)&mode=([a-zA-Z0-9_]*)&(p|t|f|u|popup)=([0-9]*)'",
"'(?<!/)modules.php?name=@@@Forums&file=([a-zA-Z0-9_]*)&mode=([a-zA-Z0-9_]*)'",
"'(?<!/)modules.php?name=@@@Forums&file=search&([a-zA-Z0-9_]*)=([a-zA-Z0-9_]*)&([a-zA-Z0-9_]*)=([a-zA-Z0-9_]*)'",
"'(?<!/)modules.php?name=@@@Forums&file=([a-zA-Z0-9_]*)&([a-zA-Z0-9_]*)=([a-zA-Z0-9_]*)'",
"'(?<!/)modules.php?name=@@@Forums&file=index'",
"'(?<!/)modules.php?name=@@@Forums&file=([a-zA-Z0-9_]*)'",
"'(?<!/)modules.php?name=@@@Forums'", |
|
dans la partie $urlout = array( :
// forums
"forum-sujet\1.html",
"forumx\1-\2-\3.html",
"forum\1-\2\3.html",
"forum\1.html",
"postx\1-\2-\3.html",
"postxf\1-\2-\3.html",
"posts\1-\2\3.html",
"topic\1-\2.html",
"post\1\2.html",
"register-coppa-\1.html",
"register-\1.html",
"poster\1-\2_\3.html",
"modcp\1-\2.html",
"forums-\1-\2-\3-\4.html",
"forums-\1-\2-\3-\4.html",
"forums-\1-\2-\3-\4.html",
"forums-\1-\2-\3-\4.html",
"forums-\1-\2.html",
"forum\1-\2-\3-\4.html",
"forums\1-\2-\3.html",
"forums.html",
"forum-\1.html",
"forums.html", |
|
|
|
Publié le : 2007-07-26 par stefvar, dernière modification le : 2007-07-26 par stefvar(149 lectures) |