防爆pression引擎2 301重定向旧模板组新 [英] Expression Engine 2 301 redirect old template group to new one
问题描述
我想这将是pretty的简单,但我有问题的永久重定向一个旧模板组到一个新的。
I thought this would be pretty simple, however I am having issues permanently redirecting an old template group to a new one.
我有 www.domain.co.uk/weddings
需要被引导到 www.domain.co.uk/more-weddings
。
这两个模板组存在的,不知道我是否需要删除旧的吗?或者在模板preferences任何其他设置?
Both template groups exist, not sure if I need to delete the old one too? Or any other settings in the template preferences?
这就是我一直在尝试使用:
Here's what I have been trying to use:
RedirectMatch 301 ^/weddings\$ http://www.domain.co.uk/more-weddings
我有一个负载更多的重定向这是工作压力太大,这是否新的需要放在上面呢?
I have a load more redirects which are working too, does this new one need to be placed above them?
推荐答案
您可以启用旧的模板(婚礼/指数),PHP,并将这个在它:
You could enable PHP in the older template (weddings/index) and place this in it:
<?php
header('HTTP/1.1 301 Moved Permanently');
header('Location: http://www.domain.co.uk/more-weddings');
exit();
?>
这篇关于防爆pression引擎2 301重定向旧模板组新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!