Skip to content

Bug: forceHTTPS method ignores baseURL configuration when redirecting #2633

Description

@jlamim

Describe the bug
When doing a redirect using $this->forceHTTPS(), the URL to which the redirection is made does not match the URL of the application.

URL accessed: http://codigos-livroci4.lsd/blog_ci4/public/blog/https

Redirect URL: https://codigos-livroci4.lsd/blog/https

You should redirect to: https://codigos-livroci4.lsd/blog_ci4/public/blog/https

baseURL configured: http://codigos-livroci4.lsd/blog_ci4/public

CodeIgniter 4 version
4.0.2

Affected module(s)
Controller

Expected behavior, and steps to reproduce if appropriate
You should redirect to https://codigos-livroci4.lsd/blog_ci4/public/blog/https

Context

  • OS: Windows 10
  • Apache 2.4.41
  • PHP 7.4.0

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

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions