[wp-trac] [WordPress Trac] #56381: WordPress creates invalid web.config -file

WordPress Trac noreply at wordpress.org
Mon Aug 15 18:12:27 UTC 2022


#56381: WordPress creates invalid web.config -file
---------------------------+-----------------------------
 Reporter:  liskoslayer63  |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Rewrite Rules  |    Version:  6.0
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 When WP creates the web.config file for URL Rewrite, it uses apparently
 wrong syntax in the file. In the file that WordPress creates, it has this
 line: {{{<match url="*"/>}}} when it should have this: {{{<match
 url="(.*)"/>}}}.

 This causes very odd behavior on the site, mainly because of Internal
 Server Error 500. The weird part is, that all image links that uses the
 plain name causes that error, but if you add the size to the url (eg.
 {{{/file.jpg}}} -> {{{file-150x150.jpg}}}) the error goes away and the
 image loads normally.

 Ihad zero plugins installed when this occured. Tried also generating the
 file multiple times, always the same bug except when using "Plain" for
 url's.

 I have Googled a lot, and found that there's many people who's suffering
 from that exact behavior at least from version 5.6. I do not know if they
 used IIS (Windows) for hosting, but if the used, then that web.config file
 is the reason on that case.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56381>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list