A
A
Alexander Karpov2017-05-29 07:10:06
Nginx
Alexander Karpov, 2017-05-29 07:10:06

Why is Nginx ignoring the redirect rule in rewrite?

There are specific rules

rewrite '^/catalog/items/Набор сковород, 2 пр., SD SET601i/(.*)' https://$host/catalog/items/nabor_skovorod_2_pr_sd_set601i_6420_i_6426_i/$1 permanent;
    
    rewrite '^/catalog/items/%D0%9D%D0%B0%D0%B1%D0%BE%D1%80+%D1%81%D0%BA%D0%BE%D0%B2%D0%BE%D1%80%D0%BE%D0%B4,+2+%D0%BF%D1%80.,+SD+SET601i/(.*)' https://$host/catalog/items/nabor_skovorod_2_pr_sd_set601i_6420_i_6426_i/$1 permanent;
    rewrite '^/catalog/items/Набор+сковород,+2+пр.,+SD+SET601i/(.*)' https://$host/catalog/items/nabor_skovorod_2_pr_sd_set601i_6420_i_6426_i/$1 permanent;

but for some reason only the first rule works...
There are no such problems with other rules.
Comrades experts, tell me please.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karpov, 2017-05-29
@Inkognitoss

had to be shielded. So:

rewrite '^/catalog/items/Набор\+сковород,\+2\+пр.,\+SD\+SET601i/(.*)' https://$host/catalog/items/nabor_skovorod_2_pr_sd_set601i_6420_i_6426_i/$1 permanent;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question