Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess Joomla 2.5 SEO/htaccess停止组件检测_.htaccess_Joomla_Joomla2.5_Sef - Fatal编程技术网

.htaccess Joomla 2.5 SEO/htaccess停止组件检测

.htaccess Joomla 2.5 SEO/htaccess停止组件检测,.htaccess,joomla,joomla2.5,sef,.htaccess,Joomla,Joomla2.5,Sef,我正在开发一个基于Joomla 2.5框架的客户网站。关闭SEF(内置Joomla版本)后,URL如下 http://(domain)/index.php?option=com_cmgroupbuying&view=alldeals&Itemid=424 用户有一个插件,我在插件行中内置了一个插件,以确保该插件仅在组件CMGroupbuying使用时启动 $component = JRequest::getCmd('option'); if($component =='com

我正在开发一个基于Joomla 2.5框架的客户网站。关闭SEF(内置Joomla版本)后,URL如下

http://(domain)/index.php?option=com_cmgroupbuying&view=alldeals&Itemid=424
用户有一个插件,我在插件行中内置了一个插件,以确保该插件仅在组件CMGroupbuying使用时启动

$component = JRequest::getCmd('option'); 
if($component =='com_cmgroupbuying')
               { etc etc }
关闭SEF后,此功能运行良好。但是,当我启用SEF时,URL变成

http://(domain)/the-deals
检测脚本停止工作,因为joomla不再看到Request::getCmd('option');老实说,与com_cm团购一样,getCmd毫无用处,这让我大吃一惊。我曾看到其他prople在该部分中受到此问题的困扰,但没有找到任何确定的解决方法


有谁能提供一个解决方案来阻止Joomla的这一失败,或者在默认的htaccess错误中添加一些额外的行来保留此信息供Joomla使用,或者检测URL的一部分,以便我可以从Joomla堆栈交换上的用户修复的

中构建检测器脚本

函数被包装在一个

class plgSystemCMMobileDetection extends JPlugin {
    public function onAfterInitialise()
    {

这意味着该函数是在路由完成之前启动的。我刚把onAfterInitialise改为onAfterRoute,一切都搞定了

您是否尝试过使用
JRequest::getVar('option')