Skip to content

Conversation

@michalsn
Copy link
Member

Description
This PR fixes a bug where route path detection was failing when serving the app from a subfolder using Apache mod_rewrite (to "hide" public directory) while preserving index.php in URL.


So something like: https://localhost/ci/index.php/controller/method - when our real directory structure was like: ci/public/index.php. This caused the route path to return: index.php/controller/method instead of controller/method.

Closes #9607
Fixes #9602

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn michalsn added the bug Verified issues on the current code behavior or pull requests that will fix them label Jun 25, 2025
@michalsn michalsn merged commit 28e8096 into codeigniter4:develop Jun 30, 2025
50 checks passed
@michalsn
Copy link
Member Author

Thank you @paulbalandan

@michalsn michalsn deleted the fix/nested-folder-rewrite-with-index branch June 30, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: codeigniter in a subdirectory + indexPage results in 404

3 participants