S
S
Sergey2014-07-07 21:20:53
Apache HTTP Server
Sergey, 2014-07-07 21:20:53

How to solve the problem with redirect in .htaccess?

There is a design

RedirectMatch 301 /*/(.*).html$ https://newdomain.com/blog/$1/

Which works correctly and redirects everything you need. How to make sure that he does not redirect the main one?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Trofimenko, 2014-07-08
@AdmAlexus

Of course, I'm not an expert, and there is nowhere to check, but ... Maybe such a bydlocode will pass:
Redirect 301 /index.php https://newdomain.com/index.php
Those . just make the next rule redirect index to index?

E
Eugene, 2014-07-08
@Eugeny1987

most likely something like this
RedirectMatch 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