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之cursor属性
参考:http://www.w3school.com.cn/tiy/t.asp?f=csse_zindex cursor 属性规定要显示的光标的类型(形状). <html> <bod ...
- SharePoint中的权限体系
转:http://blog.csdn.net/yl_99/article/details/7767053 1.MOSS中的权限结构 MOSS中的权限结构主要有三部分:网站权限,列表权限,个人权限. 网 ...
- 查看各个release版本 golang的改动
https://golang.org/doc/go1.1 https://golang.org/doc/go1.2 https://golang.org/doc/go1.3 https://golan ...
- Cookie帮助类
using System; using System.Collections.Generic; using System.Text; using System.Web; namespace AIMSC ...
- 为什么浏览器User-agent总是有Mozilla字样(User-agent String里的历史故事)【搜藏】
你是否好奇标识浏览器身份的User-Agent,为什么每个浏览器都有Mozilla字样? Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 ...
- ImagePacker
[下载]:ImagePacker 0.0.2 [作用]:将多个图片打包到指定大小的图片中,并输出配置文件.类似于 TexturePacker,不过当前只支持 Starling 格式输出(因为我现在使用 ...
- ADB 远程无线调试
由于自己购买的x4412 Android开发板存在一个问题,是无法同时链接USB线,和插入无线网卡.只能使用其中一个功能 需要复现一个DRM在线下载的功能,同时需要抓起一些日志信息,此处就想到了使用 ...
- codeforce 606C - Sorting Railway Cars
题意:给你一串数,没个数只能往前提到首位,或则往后放末尾.问最少步骤使操作后的序列成上升序列. 思路:最长连续子序列. #include<iostream> #include<std ...
- 机器学习总结之逻辑回归Logistic Regression
机器学习总结之逻辑回归Logistic Regression 逻辑回归logistic regression,虽然名字是回归,但是实际上它是处理分类问题的算法.简单的说回归问题和分类问题如下: 回归问 ...
- 【HBase学习】Apache HBase 参考手册 中文版
正在撰写,稍后来访……