2010-10-21 3 views
0
RewriteRule ^photographs/?$ photographs.php [L] 
RewriteRule ^photographs/(.*)/?$ photographs.php?cat=$1 [L,QSA] 
RewriteRule ^photographs/(.*)/(.*)/?$ photographs.php?cat=$1&page=$2 [L,QSA] 

Je en ai besoin d'avoir des options telles que.htaccess conditionnelle pour l'URL

  • /photos
  • /photos/catégorie
  • /photos/catégorie/3

Merci

+0

pas sûr de ce que vous essayez d'accomplir – Anon

Répondre

1
RewriteRule ^photographs/?$ index.php [L] 
RewriteRule ^photographs/([^/]+)/?$ index.php?cat=$1 [L,QSA] 
RewriteRule ^photographs/([^/]+)/([^/]+)/?$ index.php?cat=$1&page=$2 [L,QSA] 

C'est parce que (.*) correspond également / caractère.