L
L
legatobrown2021-02-19 12:00:04
htaccess
legatobrown, 2021-02-19 12:00:04

How to specify bulk redirects in .htaccess (as in a for loop)?

I need to make redirects from pages, I do a redirect in the .htaccess file with the following command -

redirect /article56 https://ritual-moskva.ru/crematoria/nikolo-arkhangelskiy-krematoriy/


but how to make a redirect on all links like /article with numbering?

redirect /article5 https://ritual-moskva.ru/crematoria/nikolo-arkhangelskiy-krematoriy/
redirect /article6 https://ritual-moskva.ru/crematoria/nikolo-arkhangelskiy-krematoriy/
redirect /article7 https://ritual-moskva.ru/crematoria/nikolo-arkhangelskiy-krematoriy/
redirect /article8 https://ritual-moskva.ru/crematoria/nikolo-arkhangelskiy-krematoriy/


how to make all such links redirected? in php i could do it through a for loop.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2021-02-19
@legatobrown

RedirectMatch ^/article[0-9]+ https://ritual-moskva.ru/crematoria/nikolo-arkhangelskiy-krematoriy/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question