301重定向htaccess的更改URL结构

问题描述:

我想从Word preSS多站点安装所有页面重定向到另一个Word preSS装置 - 例如, website.com/blog/blog/page website.com/our-blog/page

I'd like to redirect all pages from a Wordpress multi-site installation to another Wordpress installation - e.g. website.com/blog/blog/page to website.com/our-blog/page

使用重定向301 / http://www.website.com/our-blog/ 不起作用,因为游客将被重定向到 website.com/our-blog/blog/blog/page 。有谁知道如何删除 /博客/博客

Using redirect 301 / http://www.website.com/our-blog/ doesn't work because the visitors are redirected to website.com/our-blog/blog/blog/page. Does anyone know how to remove the /blog/blog?

感谢您!

您可以使用 RedirectMatch

RedirectMatch 301 ^/blog/blog/(.+)$ http://www.website.com/our-blog/$1