Answer the question
In order to leave comments, you need to log in
How to complement the regular expression so that it does not work in the presence of the exact word?
There is a redirect RewriteRule (.*)\/([0-9]+)$ $1 [R=301,L]
How to make the view addresses /какой то номер на конце
redirect (this is implemented in the line above)
But if the view address at the end /page/какой то номер
is not redirected?
Thanks
Answer the question
In order to leave comments, you need to log in
It is necessary to use negative lookahead in the regular expression:RewriteRule (.*)(?!page/)\/([0-9]+)$ $1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question