2013-02-28 44 views
0

我已经有一个功能.htaccess重写,重写自定义URL并显示某个菜单的内容。Joomla .htaccess mod_rewrite菜单不是文章

不过,这并不表明它有一个菜单项,它显示为文章!

我想重写的方式,内容显示为菜单(如预期),我该怎么办呢?

我想在重定向中存在一些冲突,或者菜单在我的自定义.htaccess之前重定向?

我想尽组合,我能想到的。

我目前的.htaccess(相关部分):

Options +FollowSymLinks 
Options -Indexes 
RewriteEngine On 
RewriteRule ^(en/)?(custom)/?$ /index.php?option=com_content&view=article&id=2308&Itemid=545&lang=en [L] 

我已经试过并给出未发现:

(顺便说一句,如果我把http://www.mysite.com/?option=com_content&Itemid=545在浏览器地址酒吧,它显示

RewriteRule ^(en/)?(custom)/?$ /en/?option=com_content&Itemid=545 [L] 

RewriteRule ^(en/)?(custom)/?$ /?option=com_content&Itemid=545 [L] 

RewriteRule ^(en/)?(custom)/?$ ?option=com_content&Itemid=545 [L] 

RewriteRule ^(en/)?(custom)/?$ /en/index.php?option=com_content&Itemid=545 [L] 

RewriteRule ^(en/)?(custom)/?$ /index.php?option=com_content&Itemid=545 [L] 

RewriteRule ^(en/)?(custom)/?$ index.php?option=com_content&Itemid=545 [L] 

RewriteRule ^(en/)?(custom)/?$ /en/mymenu/thesubmenu [L] 

RewriteRule ^(en/)?(custom)/?$ /mymenu/thesubmenu [L] 

RewriteRule ^(en/)?(custom)/?$ mymenu/thesubmenu [L] 

回答

0

这最终是在SEO红色有冲突,因为预期的菜单) Joomla提供的产品。

解决方法是使用通过插件(我自定义)完成的内部重写,这样重写将在正确的上下文中显示正确的内容(作为此特定情况下的菜单项)。

正如我所看到的那样,由于冲突,这是唯一的解决方案,最终不会通过.htaccess完成。