Bonjour,
J'ai un site sous la forme monsite/top qui doit être réécrit en monsite/index.php?page=top. Le script me sort alors une liste par ordre croissant.
Jusque là tout va bien.
Mais parfois j'ai ce genre d'url : monsite/post/12/blabl-blablabl qui doit réécrire en : monsite/index.php?page=post&id=12 blabla étant les mots clés.
voici ma règle:
bien entendu cela ne fonctionne pas...
j'ai aussi tenté :
sans succès...
Vous avez une idée ?
J'ai un site sous la forme monsite/top qui doit être réécrit en monsite/index.php?page=top. Le script me sort alors une liste par ordre croissant.
Jusque là tout va bien.
Mais parfois j'ai ce genre d'url : monsite/post/12/blabl-blablabl qui doit réécrire en : monsite/index.php?page=post&id=12 blabla étant les mots clés.
voici ma règle:
Code:
RewriteRule ^([a-z]+)/([0-9]+)/([a-z]+)$ http://localhost/monsite/index.php?page=$1&id=$2
bien entendu cela ne fonctionne pas...
j'ai aussi tenté :
Code:
RewriteRule ^([a-z]+)/([0-9]+)$ http://localhost/monsite/index.php?page=$1&id=$2
sans succès...
Vous avez une idée ?