301重定向htaccess的更改URL结构 [英] 301 Redirect htaccess Change URL Structure

查看:162
本文介绍了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

这篇关于301重定向htaccess的更改URL结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆