X
X
xilgiz2021-02-04 15:42:45
htaccess
xilgiz, 2021-02-04 15:42:45

How to do mass htaccess redirect?

Good afternoon
How to make a mass redirect from links of the site.ru/url-adres/url type with the condition that if the url is "url" at the end, then it corrects to site.ru/url-adres/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2021-02-04
@xilgiz

RedirectMatch 301 ^/(.+)/url$ /$1/
Or
RewriteRule ^(.+)/url$ /$1/ [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question