Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Ability to specify response code on controller plugin redirect #313

Open
@jroedel

Description

@jroedel

I have changed my routing setup on a production app, and I would like to provide search engines with the information that a new URL format is being used. For this I would like to use code 301 (Permanently Moved) instead of 302 (Found).

Code to reproduce the issue

In a controller action:

return $this->redirect()->toUrl('https://github.com'); //, ['statusCode' => 301]);

Expected results

I should be able to specify a statusCode of choosing

Actual results

The browser receives a 302 response code always.

Thanks for all your support!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions