覆盖joomla中的htaccess

时间:2014-01-29 05:09:14

标签: .htaccess joomla

我需要为joomla中的特定组件重写url,以便在url中看不到实际的组件名称。

E.g index.php?option = com_mycomponent

我需要将com_mycomponent替换为xyz

我也安装了joomsef扩展,但它在joomla中的语言过滤插件不能正常工作。

所以我需要使用htaccess

重写特定组件的url

所以请尽快建议我适当的解决方案

3 个答案:

答案 0 :(得分:1)

“简单自定义路由器”扩展程序可以帮助您:

http://extensions.joomla.org/extensions/site-management/sef/21251

希望这对你来说足够了。 :)

答案 1 :(得分:0)

您是否尝试过基本的.htaccess重写?基本的重写引擎不应该太难:

RewriteEngine On    # Turn on the rewriting engine
RewriteRule    ^my_component_pretty_url$    ?option=com_mycomponent    [NC,L] 

如果有人有更好的重写规则,请添加...我的超级基本。

答案 2 :(得分:0)

试试这个,

RewriteEngine On 
RewriteRule ^chaletreservation$ index.php?option=com_jrestaurantreservation        [QSA,L]
RewriteRule ^chaletreservation(.+)$ index.php?option=com_jrestaurantreservation&$1 [QSA,L]

然后只需使用此组件的网址index.php?option=com_jrestaurantreservation,如下所示

www.yourdomain.com/chaletreservation

希望它的作品......