0

我在一个新的 2.5 joomla 站点工作,旧站点是 1.5,旧站点的 url 不是 SEF。我需要将旧的 1.5 no SEF url 重定向到新的 SEF url,我这样做:

redirect 301 /index.php?option=com_k2&v... http://www.newsite.com/es

(注意 url 中的语言,它似乎对问题很重要,我使用的是 joomla 集成语言系统)

但它不起作用,joomla 以某种方式剥离了 index.php 并且重定向不起作用。我尝试从重定向中删除 index.php,但它也不起作用。我是 htaccess 和重定向的菜鸟,我被困在这...谢谢。

4

2 回答 2

0

最好的办法是执行一个完整的重定向(没有查询参数,即 Redirect 301 / http://newsite.com/)并使用 SH404sef 扩展名处理新站点上的查询词。http://extensions.joomla.org/extensions/site-management/sef/10134

于 2013-07-15T17:20:03.323 回答
0

Well, like this seems to be a hard problem, i think i just found a solution doing extensives testing and googling...

I found a rewrite and put it before the joomla rewrites:

RewriteCond %{QUERY_STRING} ^(.*)lang=es$
RewriteRule ^(index\.php)?$ /es? [R=301,L]

This replace the normal redirect 301.

Its hard for me to explain because i dont have too much knowledge about redirections and htaccess, the important think is that it seems to work for my problem, i hope other people just found this helpful.

If someone can explain the sintaxis of this code it will be grate.

Thank you very much.

于 2013-07-15T15:27:20.323 回答