Bonjour,

Je souhaiterais avoir votre avis sur les rewrites rules suivantes :

CODE
RewriteEngine on
RewriteRule ^([a-z0-9]+)-([0-9]+)([-a-z0-9]*)-([0-9]+)\.html$  index.php?category=$1&id=$2&page=$4 [L]
RewriteRule ^([a-z0-9]+)-([0-9]+)([-a-z0-9]*)\.html$  index.php?category=$1&id=$2 [L]
RewriteRule ^([a-z0-9]+)-page-([0-9]+)\.html$  index.php?category=$1&page=$2 [L]
RewriteRule ^([a-z0-9]+)\.html$  index.php?category=$1 [L]


Exemple du général au particulier (avec une catégorie "articles")

1. articles.html -> index.php?category=articles
2. articles-page-2.html -> index.php?category=articles&page=2
3. articles-1.html -> index.php?category=articles&id=1
4. articles-1-titre-de-article.html -> index.php?category=articles&id=1
5. articles-1-titre-de-article-page-2.html -> index.php?category=articles&id=1&page=2


Résultats attendus :

1. Les x premiers articles de la catégories articles sont affichées.
2. Les x articles suivants de la catégories articles sont affichées.
3. L'article y est affiché.
4. L'article y est affiché (le titre est à titre informatif pour le référencement).
5. La page n de l'article y est affichée.

Je pense avoir énumerer tous les cas de traitement possibles (par rapport au script chargé de gérer).

Y'a-il moyen selon vous d'optimiser ces régles ?

Merci