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. 异常处理 Exception

    一.异常类 1.在C#中所有的异常都是使用一个异常类型的示例对象表示的,这些异常类型都是继承自System.Exception类型,或者直接使用System.Exception类型的实例对象: 2.在 ...

  2. CSS中的块级元素与行级元素

    最近初学CSS时对块级元素与行级元素有时会产生混淆,写篇博客记录一下自己对其的理解. 先从概念上来看: 块级元素 特点:1.每个块级元素都是独自占一行,其后的元素也只能另起一行,并不能两个元素共用一行 ...

  3. .NET 4.0中的泛型协变和逆变

    随Visual Studio 2010 CTP亮相的C#4和VB10,虽然在支持语言新特性方面走了相当不一样的两条路:C#着重增加后期绑定和与动态语言相容的若干特性,VB10着重简化语言和提高抽象能力 ...

  4. MemoryMappedFile 内存映射文件 msdn

    http://msdn.microsoft.com/zh-cn/library/dd997372%28v=vs.110%29.aspx 内存映射文件 .NET Framework 4.5 其他版本 1 ...

  5. HttpListener supports SSL only for localhost? install certificate

    1.Start-All Programs - 2.execute below lines on that ‘Developer Command Prompt..’ tool makecert -n & ...

  6. HDU5046 Airport dancing links 重复覆盖+二分

    这一道题和HDU2295是一样 是一个dancing links重复覆盖解决最小支配集的问题 在给定长度下求一个最小支配集,只要小于k就行 然后就是二分答案,每次求最小支配集 只不过HDU2295是浮 ...

  7. VTK三维重建(2)-根据脚部骨骼CT的三维重建和显示

    [效果演示] 根据脚部的骨骼CT扫描的照片,利用VTK完成读取和三维重建. [程序实现] void main () { vtkRenderer *aRenderer = vtkRenderer::Ne ...

  8. FTP被动模式无法被传统CDN模式加速

    我在CDN公司,遇到一个客户需要加速ftp服务,故给出了这样的方案 客户使用的是vsftpd 2.0.5 我们建议客户在vsftpd.conf里加入如下配置 #pasvpasv_enable=YESp ...

  9. 【学习干货】给coder的10个读书建议

    1.知识更新非常快,大学一毕业就已经有40%的知识过时,一年不读书80%过时,三年不读书99%过时.这就要求我们不间断阅读,每年每月每星期每天都要阅读,只有长期的阅读才能不被淘汰:也只有长期阅读,才能 ...

  10. c功能实战

    1,linux C连接ftp实现简单的上传下载; libcurl/libftp/busybox; oracle查看用户信息 1. 查询oracle中所有用户信息 select * from dba_u ...