Most likely, the error in the regular expression, but I can not understand what.

I am writing this rule:

rewrite (.*)\/size\/([0-9]+)\/color\/([0-9]+) $1?size=$2&color=$3 last; 

But nothing happens.

Here is an example url that should work:

 http://kupitkamen.ru/catalog/plitnyak/peschanik/size/20/color/27 

These are the rules that work without problems:

  • rewrite (.*)\/size\/([0-9]+) $1?size=$2 last;

  • rewrite (.*)\/color\/([0-9]+) $1?color=$2 last;

  • 1. it is better to bind to the beginning and end of the line (see any rewrite example). 2. How did you determine that “not working”? - aleksandr barakin
  • Please provide the entire contents of the corresponding server section. right in the question (in the comments it will be unreadable). To correct the question text, click edit below the question text. - aleksandr barakin
  • Please indicate the order in which the rules follow. Can not the more general rule intercept the request to your more specific rule? - cheops

0