Answer the question
In order to leave comments, you need to log in
How to write a condition for several types of url components in a 301 redirect?
I have a condition for redirecting all links ending with "/alias.html" to ending with "/alias/" except for links that contain the link component "/order/". Tell me, please, how can I add an exception to "/order/" and "/contacts/" to the condition?
RedirectMatch 301 ^((?:[^/]*/)++(?<!/order/).*)\.html$ $1/
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question