bmacuer
bmacuer

Reputation: 37

MOD_REWRITE rule not working ignoring variables

I did this rule

RewriteRule ^([^/.]+)/stock/([^/.]+)/([^/.]+)/([0-9]+) product_list.php?model=$1&year=$5 [L]

But it only takes model variable and ignores year. what im i doing wrong?

Upvotes: 0

Views: 12

Answers (1)

collapsar
collapsar

Reputation: 17238

There are only 4 capture groups in your regex while you reference the fifth with $5.

Upvotes: 1

Related Questions