使用重定向组件或 htaccess 重定向 URL

Redirect URLs using Redirect component or htacess

在 Joomla 3.4 中要重定向此页面:

https://www.portal-gestao.com/component/k2/1422-como-i...%C3%A9tica-na-sua-empresa.html

为此:

https://www.portal-gestao.com/item/1422-como-i...%C3%A9tica-na-sua-empresa.html

使用组件 - > 重定向,我添加了以下重定向:

/component/k2/1422-como-i...ética-na-sua-empresa.html

重定向至:

https://www.portal-gestao.com/item/1422-como-i...%C3%A9tica-na-sua-empresa.html

但这没有用。

然后我在.htaccess中添加:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.portal-gestao.com
RewriteRule ^component/k2/(.*)$ https://www.portal-gestao.com/item/ 

但这也行不通。

有人帮忙吗?

添加重定向标志

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.portal-gestao.com
RewriteRule ^component/k2/(.*)$ https://www.portal-gestao.com/item/ [R=301,L]