-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default url rewrites to /index.php (#1072)
If a requested file path can't be resolved (file or folder don't exist) the request file path is rewritten to /index.php. ## What problem is it solving? Ensures a response when requesting WordPress permalink URLs like `/category/uncategorized/` using `php.request`. ## How is the problem addressed? The code assumed that a path which isn't a PHP file is a folder and requested the index.php file in that folder. In the case of WordPress URLs the path might not be a folder so adding index.php would break a valid request. To address this, index.php is added to the end of the path only if the path is a valid directory. If not, the path is rewritten to index.php in the root folder. ## Testing Instructions - Confirm that tests pass
- Loading branch information
Showing
2 changed files
with
40 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters