A
A
alenev2018-06-15 14:46:17
htaccess
alenev, 2018-06-15 14:46:17

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 question

Ask a Question

731 491 924 answers to any question