301将旧链接重定向到新子目录

时间:2014-04-08 20:25:59

标签: .htaccess mod-rewrite redirect joomla magento-1.6

我正在尝试在我的Joomla .htaccess文件中进行重定向 错误的链接是:

http://nilandsplace.com/index.php/camping_eng/camping?___store=camping_eng

我试图让它去:

http://nilandsplace.com/store/index.php/camping/camping-home/?___store=camping

无论什么301重定向我尝试过它不起作用我找不到404页面或者我得到500服务器错误。它也可以去:

http://nilandsplace.com/store/camping/

我几乎通过删除链接中的index.php来实现它,但是有很多旧的外部链接与index.php有关。我尝试过15种以上的不同方法但仍然无法在不破坏我的Joomla链接的情况下获得它

http://nilandsplace.com/index.php

我知道基础知识,重写引擎已启动,而且我已将所有内容放在Joomla重定向之前。 Joomla .htaccess是Joomla安装的基本版本。 谢谢James Niland http://nilandsplace.com

1 个答案:

答案 0 :(得分:0)

您可以将此规则用作根目录中的第一条规则.htaccess:

RewriteCond %{THE_REQUEST} /camping_eng/camping\?___store=camping_eng [NC]
RewriteRule ^ /store/camping/? [R=301,L]
相关问题