[wp-trac] [WordPress Trac] #20746: Accessing non-existing theme folder in Network install gives 500 error

WordPress Trac noreply at wordpress.org
Mon Apr 9 15:27:29 UTC 2018


#20746: Accessing non-existing theme folder in Network install gives 500 error
-------------------------------------+-----------------------------
 Reporter:  arkimedia                |       Owner:
     Type:  defect (bug)             |      Status:  reopened
 Priority:  normal                   |   Milestone:  Future Release
Component:  Rewrite Rules            |     Version:  3.3.2
 Severity:  normal                   |  Resolution:
 Keywords:  needs-testing has-patch  |     Focuses:  multisite
-------------------------------------+-----------------------------

Comment (by ajoah):

 I think it has not been said : there is a similare problem for subdomains
 multisite.

 URL to a non existing php file inside a subfolder return a 500 error.

 Examples :

 `example.com/non-dir/non-file.php`

 Same thing inside non existing theme folder :

 `example.com/wp-content/themes/non-theme/non-file.php`


 But no problem with other file extension :


 `example.com/non-dir/non-file.txt`
 `example.com/wp-content/themes/non-theme/non-file.txt`

 These two urls return the 404 page of WP.

 Theses following urls return a 404 too but not the website 404 (just a 404
 page with the text "File not found")

 `example.com/wp-content/themes/non-file.php`
 `example.com/wp-content/non-file.php`



 If i delete this htaccess line, it works as it expected :

 {{{
 RewriteRule ^(.*\.php)$ $1 [L]
 }}}

 WP 4.9.5

--
Ticket URL: <https://core.trac.wordpress.org/ticket/20746#comment:45>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list