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 :保存到一个作用域中 ...
随机推荐
- pl/sql developer 编码格式设置
pl/sql developer编码格式设置 一.pl/sql developer 中文字段显示乱码 原因:因为数据库的编号格式和pl /sql developer的编码格式不统一造成的. 二. ...
- android studio 使用的一些注意,一些报错的解决方法(原创)
NDK 编译无法通过 注意看 build.gradle 里面的 有些是 ndk-build windows 上用 ndk-build.cmd Summary: gradle calls ndk-bui ...
- (转载)linux环境变量
转自:http://www.cnblogs.com/growup/archive/2011/07/02/2096142.html Linux 的变量可分为两类:环境变量和本地变量 环境变量,或者称为全 ...
- FOJ 1608 Huge Mission 线段树
每个节点维护一个最小值,更新发现如果大于最小值,直接向下更新.速度还可以.. #include<cstdio> #include<algorithm> #include< ...
- 解决JSP页面无法使用EasyUI里面class="easyui-dialog"的问题
当使用MyEclipse新建一个JSP页面的时候,MyEclipse会自动添加一些标记,这些标记也许不一定会在工程中使用到.比如<base href="<%=basePath%& ...
- activemq 一个不错的ppt
http://people.apache.org/~jstrachan/talks/ActiveMQ-Dublin07.pdf
- python学习之optparse
Python 有两个内建的模块用于处理命令行参数: 一个是 getopt,<Deep in python>一书中也有提到,只能简单处理 命令行参数: 另一个是 optparse,它功能强大 ...
- CentOS 6.5 安装配置VSFTP
1.下载安装VSFTP 首先查看当前系统是否已经安装VSFTP,若未安装则使用yum安装. chkconfig --list | grep vsftpd #查看是否安装 yum install vsf ...
- BroadcastReceiver学习笔记
1.在代码中注册与在AndroiManifest.xml注册的区别 (a)在代码中注册可以控制注册与注销的时间.比如在onCreate-onDestory, onStart-onStop, onRes ...
- python 调用函数
Python内置了很多有用的函数,我们可以直接调用. 要调用一个函数,需要知道函数的名称和参数,比如求绝对值的函数abs,只有一个参数.可以直接从Python的官方网站查看文档: http://doc ...