如何重定向类似“ example.com/england”的网址,但保留“ example.com/england/the-team”而不更改为“ example.com/the-team”

时间:2019-01-29 11:47:20

标签: php .htaccess url redirect

我有一个客户想要重定向到某个URL:

例如,他们想要重定向的URL是: 从“ example.com/england”到“ example.com”

但是,他们希望保持第三个级别,例如: 'example.com/england/the-team' 没有重定向到'example.com/the-team'

我尝试在下面进行301重定向,但没有成功

Redirect 301 'https://example.com/england' 'https://example.com/the-team'

不确定是否可以使用,但是如果可以,我真的需要一些帮助。或就其为何行不通的合理解释。 :(

0 个答案:

没有答案