当检测到403时,我遇到让Joomla 3将用户重定向到成员页面的问题。
经过几天的研究和尝试各种事情,我终于屈服于不得不提问。
从我的研究中我了解到Joomla从templates/system/error.php主文件中读取。
我在error.php实现了以下代码,我尝试强制它通过.htaccess也没有工作。
$ReferTo = $_SERVER['REQUEST_URI']; $ReferTo = base64_encode($ReferTo); if ($this->error->getCode() == '403') { header('Location: ' . $this->baseurl . '/members'); die(); }目前的行为是Joomla只是将用户发送到一个非常无用的403默认页面。
关于这个的任何想法? 非常感谢您的帮助。
I have a problem with getting Joomla 3 to redirect users to a member page when a 403 is detected.
Upon researching and trying various things for literally days now I've finally given in to having to ask the question.
From my research I understand that the Joomla reads from the templates/system/error.php master file.
I have the following code implemented within the error.php and I have tried forcing it through .htaccess as well and neither work.
$ReferTo = $_SERVER['REQUEST_URI']; $ReferTo = base64_encode($ReferTo); if ($this->error->getCode() == '403') { header('Location: ' . $this->baseurl . '/members'); die(); }The current behaviour is Joomla just sends the user to a very unhelpful 403 default page.
Any ideas on this one? Thanks so much for any help.
最满意答案
幸运的是,我设法找到了侥幸的解决方案。 我将系统文件夹error.php文件放入所有单独的模板文件夹中以创建系统覆盖。 到目前为止,Joomla已经认识到这一点。
Fortunately I have managed to find a solution by fluke. I dropped the system folder error.php file into all the individual template folders to create a system override. So far Joomla has recognised this.
更多推荐
Joomla,php,error,电脑培训,计算机培训,IT培训"/> <meta name="description&
发布评论