Re-ecriture d URL : Statistiques
| 1 - Sommaire |
Tout le nécessaire à la réécriture d'URL pour le module Stats.
Cela nécessite d'avoir le mod_rewrite d'activé chez votre hébergeur. |
|
| 2 - htaccess |
#Statistics
RewriteRule ^stats-([0-9]*)-([0-9]*)-([0-9]*).html modules.php?name=Statistics&op=DailyStats&year=$1&month=$2&date=$3
RewriteRule ^stats-([0-9]*)-([0-9]*).html modules.php?name=Statistics&op=MonthlyStats&year=$1&month=$2
RewriteRule ^stats-([0-9]*).html modules.php?name=Statistics&op=YearlyStats&year=$1
RewriteRule ^advstats.html modules.php?name=Statistics&op=Stats
RewriteRule ^stats.html modules.php?name=Statistics
|
|
|
|
3 - header.php
Dans la partie $urlin = array( :
// stats
"'(?<!/)modules.php?name=@@@Statistics&op=DailyStats&year=([0-9]*)&month=([0-9]*)&date=([0-9]*)'",
"'(?<!/)modules.php?name=@@@Statistics&op=MonthlyStats&year=([0-9]*)&month=([0-9]*)'",
"'(?<!/)modules.php?name=@@@Statistics&op=YearlyStats&year=([0-9]*)'",
"'(?<!/)modules.php?name=@@@Statistics&op=Stats'",
"'(?<!/)modules.php?name=@@@Statistics'", |
|
dans la partie $urlout = array( :
// stats
"stats-\1-\2-\3.html",
"stats-\1-\2.html",
"stats-\1.html",
"advstats.html",
"stats.html", |
|
Publié le : 2007-07-27 par stefvar, dernière modification le : 2007-07-27 par stefvar(89 lectures) |