O
O
Oleg12342020-02-09 14:28:45
htaccess
Oleg1234, 2020-02-09 14:28:45

Is it possible to mass redirect (301) for links in htaccess?

Hello
Please tell me the correct mass redirect from links of this type:
www.site.ru/content/600-nazvanie-novosti.html

to links of this format:
www.site.ru/content.php?r=600-nazvanie-novosti

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2020-02-09
@Oleg1234

RedirectMatch 301 ^/content/(.+)\.html$ /content.php?r=$1

Or
RewriteEngine On

RewriteRule ^content/(.+)\.html$ /content.php?r=$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