Skip to content

Refactor Apache rewrite rules for script name access - #520

Merged
samdark merged 2 commits into
yiisoft:masterfrom
klsoft-web:update-apache-config
Sep 15, 2026
Merged

samdark merged 2 commits into
yiisoft:masterfrom
klsoft-web:update-apache-config

Conversation

@klsoft-web

Copy link
Copy Markdown
Contributor

No description provided.

@samdark

samdark commented Sep 14, 2026

Copy link
Copy Markdown
Member

@klsoft-web would you please explain these changes? Thanks.

@klsoft-web

klsoft-web commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

@klsoft-web would you please explain these changes? Thanks.

The current rule only works if the script name contains the symbol '/' at the end of the URL.

For example, this works:
http://mysite/index.php/

Call sequence:

  1. Apache redirect to 404.

This does not:
http://mysite/index.php

Call sequence:

  1. Apache calls index.php.
  2. index.php calls the Yii3 application.
  3. The Yii3 application calls the NotFoundHandler.

The pull request resolves this issue.

@samdark
samdark merged commit 7a606c0 into yiisoft:master Sep 15, 2026
4 checks passed
@samdark

samdark commented Sep 15, 2026

Copy link
Copy Markdown
Member

Thanks.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants