Re-ecriture d URL : Tutoriaux
| 1 - Sommaire |
|
Dernière mise à jour le : 21 février 2006
Tout le nécessaire à la réécriture d'URL pour le module Tutoriaux.
Cela nécessite d'avoir le mod_rewrite d'activé chez votre hébergeur.
|
|
| 2 - htaccess |
#Tutoriaux
RewriteRule ^tutoriaux-voir-commentaire-([0-9]+).html modules.php?name=Tutoriaux&file=viewcomment&did=$1 [L]
RewriteRule ^tutoriaux-(enprepa|informations).html modules.php?name=Tutoriaux&rop=$1 [L]
RewriteRule ^tutoriaux-t([0-9]+).html modules.php?name=Tutoriaux&rop=souscat&cid=$1 [L]
RewriteRule ^tutoriaux-d([0-9]+).html modules.php?name=Tutoriaux&rop=tutoriaux&did=$1 [L]
RewriteRule ^tutoriaux-print-([0-9]+).html modules.php?name=Tutoriaux&file=print&did=$1 [L]
RewriteRule ^tutoriaux-paragraphe-([0-9]+)-([0-9]+).html modules.php?name=Tutoriaux&rop=navig&did=$1&eid=$2 [L]
RewriteRule ^tutoriaux-commentaire-([0-9]+).html modules.php?name=Tutoriaux&file=comment&did=$1 [L]
RewriteRule ^tutoriaux.html modules.php?name=Tutoriaux [L] |
|
ATTENTION : chez certains hébergeurs il est nécessaire de supprimer les [L] en bout de ligne. Merci à Nasedo pour l'information. |
|
3 - header.php
Dans la partie $urlin = array( :
// tutoriaux
"'(?<!/)modules.php?name=@@@Tutoriaux&file=viewcomment&did=([0-9]+)'",
"'(?<!/)modules.php?name=@@@Tutoriaux&rop=(enprepa|informations)'",
"'(?<!/)modules.php?name=@@@Tutoriaux&rop=souscat&cid=([0-9]+)'",
"'(?<!/)modules.php?name=@@@Tutoriaux&rop=tutoriaux&did=([0-9]+)'",
"'(?<!/)modules.php?name=@@@Tutoriaux&file=print&did=([0-9]+)'",
"'(?<!/)modules.php?name=@@@Tutoriaux&rop=navig&did=([0-9]+)&eid=([0-9]+)'",
"'(?<!/)modules.php?name=@@@Tutoriaux&file=comment&did=([0-9]+)'",
"'("|')modules.php?name=@@@Tutoriaux\1'", |
|
dans la partie $urlout = array( :
// tutoriaux
"tutoriaux-voir-commentaire-\1.html",
"tutoriaux-\1.html",
"tutoriaux-t\1.html",
"tutoriaux-d\1.html",
"tutoriaux-print-\1.html",
"tutoriaux-paragraphe-\1-\2.html",
"tutoriaux-commentaire-\1.html",
"tutoriaux.html", |
|
Publié le : 2007-07-27 par stefvar, dernière modification le : 2007-07-27 par stefvar(77 lectures) |