在Joomla 2.5中登录后如何重定向用户 [英] How to redirect user after login in Joomla 2.5

查看:80
本文介绍了在Joomla 2.5中登录后如何重定向用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Joomla 2.5中创建了自定义登录模块,该模块使用fancybox出现.

I have created custom Login module in Joomla 2.5 which appears using fancybox.

我们的网站正在使用SEF URL.现在我的问题是用户没有重定向到触发弹出窗口的上一页.

Our site is using SEF URL. Now my problem is user is not redirecting to previous page where popup is trigger.

我在模块中使用了以下代码,并将其传递给登录表单的"return"参数.

I have used following code in my module and passed it to "return" parameter of login form.

$uri =& JFactory::getURI();
$redirectUrl = urlencode(base64_encode($uri->toString()));

<input type="hidden" name="return" value="<?php echo $redirectUrl; ?>" />

但是它重定向并在URL末尾附加一些值,并显示404页.

But it redirect with some value appended at the end of URL and shows 404 page.

e.g.

localhost/xxx/xxxx.html

TO

localhost/xxx/xxxx.html7

推荐答案

尝试一下

$ redirectUrl = base64_encode($ uri-> toString());

$redirectUrl = base64_encode($uri->toString());

这篇关于在Joomla 2.5中登录后如何重定向用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆