I’ve merged two websites (moved posts from old website to new one).
And I want to make permanent redirect to new website.
The problem is old website posts had this structure: “http://oldsite.com/page/“, but new site posts looks like this: “http://newsite.com/page.html“.
So I’ve wrote in .htaccess
RedirectMatch 301 (.*)/$ http://newsite.com$1.html
And it’s ok with particular posts, but when you try to reach root of http://oldsite.com/
you got redirect to http://newsite.com.html/
any help would be appreciated
I fix my problem using 2 redirect rules, works for me now:
You can break this into 2 redirect rules: