Redirect
Redirect
To use this Class, add the following to the top of the file.
use Redirect;
Redirect::to($path, $status = 302, $headers = array(), $secure = null)
Creates a new redirect response to the given path.
// Create a Redirect Response to a location within the application
return Redirect::to('user/profile');
// Create a Redirect Response with a 301 status code
return Redirect::to('user/profile', 301);
// Create a Redirect Response and flash to the Session
return Redirect::to('profile')->with('message', 'Welcome Back!');
Redirect::home($status = 302)
Creates a new redirect response to the "home" route.
return Redirect::home();
Redirect::back($status = 302, $headers = array())
Create a new redirect response to the previous location.
return Redirect::back();
Redirect::refresh($status = 302, $headers = array())
Create a new redirect response to the current URI.
return Redirect::refresh();
Redirect::guest($path, $status = 302, $headers = array(), $secure = null)
Create a new redirect response, while putting the current URL in the session.
return Redirect::guest('user/profile');
Redirect::away($path, $status = 302, $headers = array())
Create a new redirect response to an external URL (no validation).
return Redirect::away('http://www.google.com');
Redirect::secure($path, $status = 302, $headers = array())
Create a new redirect response to the given HTTPS path.
return Redirect::secure('user/profile');
Redirect的更多相关文章
- Response.Redirect引起的性能问题分析
现象: 最近做的一个系统通过单点登录(SSO) 技术验证用户登录.用户在SSO 系统上通过验证后,跳转到该系统的不同模块.而跳转的时间一直维持子啊几分钟左右. 分析步骤: 在问题复现时抓取Hang d ...
- 一个由Response.Redirect 引起的性能问题的分析
现象: 某系统通过单点登录(SSO) 技术验证用户登录.用户在SSO 系统上通过验证后,跳转到某系统的主页上面.而跳转的时间很长,约1分钟以上. 分析步骤: 在问题复现时抓取Hang dump 进行分 ...
- thinkphp3.2.3中U()方法和redirect()方法区别
今天博主看3.1的教程,学着3.2,就遇到了这个坑,怎么就是不跳转呢,很纳闷!! 在thinkphp3.1 中 U()方法是可以执行跳转的(看视频教程里面是可以的,博主没有测试过). 但是在think ...
- 关于Response.Redirect 端口不一致的跳转
如果内网和外网的端口号设置的不相同,那在使用Response.Redirect跳转的时候会无法成功.需要做以下设置: <system.web> <httpRuntime useFul ...
- Server.Transfer 和 Response.Redirect 用法区别
在ASP.NET中,在后台传值方式目前大多都是用 Response.Redirect("页面地址") 来重定向页面的,但是现在还有一种方式也可以达到重定向页面的作用,而且在某些时刻 ...
- 让Response.Redirect页面重定向更有效率
用 Redirect 方法可将浏览器重定向到另一个 URL,而不是将内容发送给用户. 这里有一篇文章介绍使用Redirect<Using Response.Redirect Effectivel ...
- JAVA常见面试题之Forward和Redirect的区别
用户向服务器发送了一次HTTP请求,该请求可能会经过多个信息资源处理以后才返回给用户,各个信息资源使用请求转发机制相互转发请求,但是用户是感觉不到请求转发的.根据转发方式的不同,可以区分为直接请求转发 ...
- forward和redirect的区别(转)
Redirect Forward 不同的request 不同的对象,但是可以渠道上一个页面的内容 send后面的语句会继续执行,除非return Forward后面的语句不会继续发送给客户端 速度慢 ...
- try catch中用了 Response.Redirect 引发的线程异常终止
记录一下,提醒自己. 今天写代码的时候,在try 中写了一句 Response.Redirect 在 catch 把页面重定向到了另外一个地方 本来是想打算,如果没出现异常,就定到页面A,如果异常了 ...
- jstl param url redirect import
import标签 import标签用来导入其他页面 属性: * url :引入页面的路径 * context :工程名 * var :将引入的页面保存到一个变量中 * scope :保存到一个作用域中 ...
随机推荐
- (十三)学习CSS之两个class连一起隔空格和逗号
1.时常见到css的这两种种写法: a.两个class隔空格连一起: .class1 .class2{......} b.两个class隔逗号连一起: .class1,.class2{......} ...
- 使用CSS3美化复选框checkbox
我们知道HTML默认的复选框样式十分简陋,而以图片代替复选框的美化方式会给页面表单的处理带来麻烦,那么本文将结合实例带您一起了解一下使用CSS3将复选框checkbox进行样式美化,并且带上超酷的滑动 ...
- less命令
less命令的作用与more十分相似,都可以用来浏览文字档案的内容,不同的是less命令允许用户向前或向后浏览文件,而more命令只能向前浏览.用less命令显示文件时,用PageUp键向上翻页,用P ...
- Integrating JavaScript into Native Applications
JavaScriptCore 简介 iOS7 中新加入的 JavaScriptCore.framework 可能被大多数开发人员所忽略,但是如果你之前就在项目中用过自己编译JavaScriptCore ...
- bzoj 2656 [Zjoi2012]数列(sequence)(高精度)
[题目链接] http://www.lydsy.com/JudgeOnline/problem.php?id=2656 [题意] 计算大数递推式 [思路] 高精度 [代码] #include<c ...
- HIbernate学习笔记(二) hibernate对象的三种状态与核心开发接口
1.在hibernate中持久化对象有三个状态,这个面试时可能会问到: (1)transient瞬时态:在数据库中没有与之匹配的数据,一般就是只new出了这个对象,并且在session缓存中也没有即此 ...
- MyEclipse整合Git
1. 在OSC@China申请账号,建立项目 2. MyEclipse中选择导入项目-->Git-->Projects from Git 3. 填入Git的地址.User Name和Pas ...
- SQL Server Cpu 100% 的常见原因及优化
SQL Server Cpu 100% 的情况并不太常见,一般引起 SQL Server 产生性能问题的,都是 阻塞.连接数.IO 磁盘等.所以,一般SQL Server 的使用率都是比较低的.但是, ...
- nyoj 14 会场安排问题
会场安排问题 时间限制:3000 ms | 内存限制:65535 KB 难度:4 描述 学校的小礼堂每天都会有许多活动,有时间这些活动的计划时间会发生冲突,需要选择出一些活动进行举办.小刘的工 ...
- SQL Server 2016原生支持JSON
转载原地址: http://www.cnblogs.com/lyhabc/p/4747694.html SQL Server 2005 开始支持 XML 数据类型,提供原生的 XML数据类型.XML ...