S
S
Sergey2014-07-07 19:20:13
Apache HTTP Server
Sergey, 2014-07-07 19:20:13

How to make 301 redirect with url change?

Hello, please help.
There is such a design:

Redirect 301 /marketing/name.html  https://newdomain.com/blog/name/

How to do the same but with regexps?
Those. schematically like this:
Redirect 301 /любой текст/переменная.html  https://newdomain.com/blog/переменная/

UPD
RedirectMatch 301 /mindset/(.*).html$ https://newdomain.com/blog/$1/
This is how it works for a specific "mindset" category, how can I make it work for everyone?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Entelis, 2014-07-07
@DmitriyEntelis

Redirect 301 /любой текст/([^.]+).html  https://newdomain.com/blog/$1/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question