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的更多相关文章

  1. Response.Redirect引起的性能问题分析

    现象: 最近做的一个系统通过单点登录(SSO) 技术验证用户登录.用户在SSO 系统上通过验证后,跳转到该系统的不同模块.而跳转的时间一直维持子啊几分钟左右. 分析步骤: 在问题复现时抓取Hang d ...

  2. 一个由Response.Redirect 引起的性能问题的分析

    现象: 某系统通过单点登录(SSO) 技术验证用户登录.用户在SSO 系统上通过验证后,跳转到某系统的主页上面.而跳转的时间很长,约1分钟以上. 分析步骤: 在问题复现时抓取Hang dump 进行分 ...

  3. thinkphp3.2.3中U()方法和redirect()方法区别

    今天博主看3.1的教程,学着3.2,就遇到了这个坑,怎么就是不跳转呢,很纳闷!! 在thinkphp3.1 中 U()方法是可以执行跳转的(看视频教程里面是可以的,博主没有测试过). 但是在think ...

  4. 关于Response.Redirect 端口不一致的跳转

    如果内网和外网的端口号设置的不相同,那在使用Response.Redirect跳转的时候会无法成功.需要做以下设置: <system.web> <httpRuntime useFul ...

  5. Server.Transfer 和 Response.Redirect 用法区别

    在ASP.NET中,在后台传值方式目前大多都是用 Response.Redirect("页面地址") 来重定向页面的,但是现在还有一种方式也可以达到重定向页面的作用,而且在某些时刻 ...

  6. 让Response.Redirect页面重定向更有效率

    用 Redirect 方法可将浏览器重定向到另一个 URL,而不是将内容发送给用户. 这里有一篇文章介绍使用Redirect<Using Response.Redirect Effectivel ...

  7. JAVA常见面试题之Forward和Redirect的区别

    用户向服务器发送了一次HTTP请求,该请求可能会经过多个信息资源处理以后才返回给用户,各个信息资源使用请求转发机制相互转发请求,但是用户是感觉不到请求转发的.根据转发方式的不同,可以区分为直接请求转发 ...

  8. forward和redirect的区别(转)

    Redirect Forward 不同的request 不同的对象,但是可以渠道上一个页面的内容 send后面的语句会继续执行,除非return Forward后面的语句不会继续发送给客户端 速度慢 ...

  9. try catch中用了 Response.Redirect 引发的线程异常终止

    记录一下,提醒自己. 今天写代码的时候,在try 中写了一句  Response.Redirect 在 catch 把页面重定向到了另外一个地方 本来是想打算,如果没出现异常,就定到页面A,如果异常了 ...

  10. jstl param url redirect import

    import标签 import标签用来导入其他页面 属性: * url :引入页面的路径 * context :工程名 * var :将引入的页面保存到一个变量中 * scope :保存到一个作用域中 ...

随机推荐

  1. css选择器,有箭头与没箭头的区别

    div > span 和 div span 的区别 ,即有箭头和没箭头的区别 div > span span 是 div 的下一层级关系 在这种情况下找得到span元素: <div& ...

  2. jQuery遍历DOM

    jQuery提供了多种遍历DOM的方法.遍历方法中最大的种类是树遍历. 向上遍历DOM树 parent():返回被选元素的直接父元素 parents():返回被选元素的所有祖先元素,它一直遍历到根元素 ...

  3. ArcGIS 读写lyr层文件

    原文arcengine C# 读写lyr(转) 写lyr IFeatureLayer LineLayer = axMapControl1.get_Layer() as IFeatureLayer; I ...

  4. 数列极限---和Gauss(取整)函数有关

  5. jsp:forward与缓冲区

    jsp:forward的作用是在服务器端进行页面跳转.通常有<jsp:forward page="NewPage.jsp">语句的页面的在执行时会提前执行跳转,而不输出 ...

  6. Struts2.x jsp页面无法使用jsp:forward跳转到action

    问题:使用<jsp:forward page="test"></jsp:forward>语句无法跳转到test所对应的action. 解决办法:在web.x ...

  7. 多个分布式系统如何共享使用一个固定公网IP

    传统的做法,一个分布式业务系统就有一个中间件,一个中间件需要使用至少一个固定公网IP,这样的话,多个业务系统就需要使用多个固定公网IP. 大家知道,固定公网IP价格可是不菲的.能不能让多个分布式业务系 ...

  8. [OC Foundation框架 - 6] NSMutableString

    NSString是不可变的 NSMutableString是可变字符串   1.初始化 2.串联字符串 3.替换字符串 4.插入字符串 5.删除字符串   #pragma mark buffer st ...

  9. CSS layout入门

    元素与盒 在HTML中常常使用的概念是元素,而在CSS中,布局的基本单位是盒,盒总是矩形的. 元素与盒并非一一对应的关系,一个元素可能生成多个盒,CSS规则中的伪元素也可能生成盒,display属性为 ...

  10. UVA 299 (13.07.30)

     Train Swapping  At an old railway station, you may still encounter one of the lastremaining ``train ...