Skip to content

redirect to route ignore baseurl #1126

Closed
@puschie286

Description

@puschie286

there are some redirection problems ( well it only works with absolute paths for me )

e.g redirect()->route( 'ROUTE', [], 302 ) will route to HOST/ROUTE instead of HOST/BaseURL/ROUTE
response->redirect( '/ROUTE' ) have the same result

public $baseURL = 'https://*******/WorkDirectory/PHPPlayground/CodeIgniter4/public/';

reproduce:

  1. create a page with multiple uri parts route ( e.g. BaseURL/Test/Redirect/Route )
  2. this page redirect to another route ( e.g $this->response->redirect( 'Home' )
  3. you will get an two Location headers in the response with Location: /Home
  • you will be redirected to https://*******/Home instead of https://*******/WorkDirectory/PHPPlayground/CodeIgniter4/public/Home

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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