重定向到其他页面 [英] redirecting to some other page

查看:95
本文介绍了重定向到其他页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含三个页面的Web应用程序,一个是登录页面,第二个是联系页面,第三个是聊天页面.要遍历的自然顺序是一到第二,再从第二到第三.

需要登录(使用我们的Web服务)才能打开第二页和第三页.现在,我们有一个要求,我们要直接从第三方应用程序打开第三页.

因此,假设是否从浏览器请求了第三页,并且在同一浏览器上进行了登录(使用第一页).然后我们需要直接显示第三页,否则显示用户第一页,即登录页面.

要求类似于通过单击gmail页面中的链接可以打开所需的Facebook页面,如果facebook用户已登录,则他可以直接看到所需的页面.

请帮忙.


问候

I have a web application having three pages, one is login page, second is contact page, and third is chat page. The natural sequence to traverse is one to second and from second to third.

Login (using our web service) is required to open second and third page. Now we have a requirement that we want to open third page directly from a third party application.

So, suppose if third page is requested from browser and on the same browser login (using first page) has been made. Then we need to directly show the third page otherwise show the user first page i.e. login page.

The requirement is similar as required facebook page can be opened by clicking an link from gmail page, if facebook user has done login, he can see the desired page directly.

Please help.


Regards

推荐答案

我认为可以通过会话进行管理


如果会话仍处于活动状态,则重定向到第三页,如果没有,则重定向到登录页面

In my opinion it can be managed through sessions


if session is alive then redirect to third page and if not then redirect to login page

if(session["uid"]+""<>"")
{
 response.redirect("third page");
}
else
{
response.redirect("login page");
}




它将为您提供帮助.




it will help you..


这篇关于重定向到其他页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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