Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#56381 new defect (bug)

WordPress creates invalid web.config -file

Reported by: liskoslayer63's profile liskoslayer63 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.0
Component: Rewrite Rules Keywords: needs-testing
Focuses: Cc:

Description

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.

Change History (4)

#1 @liskoslayer63
2 years ago

That fixes the image links yeah, but now every other page shows 404 error, so really can't say what is going on.

Version 0, edited 2 years ago by liskoslayer63 (next)

#2 @SergeyBiryukov
2 years ago

  • Keywords needs-testing added

Hi there, welcome to WordPress Trac! Thanks for the ticket.

The rule in question appears to be added twelve years ago in [14885] / #12758, and it may indeed not work with newer IIS versions. Could you share the IIS version you're using?

If any other contributors looking at this ticket use IIS, some more testing to confirm the issue and the solution would be helpful to move the ticket forward.

This ticket was mentioned in Slack in #hosting-community by chaion07. View the logs.


2 years ago

This ticket was mentioned in Slack in #hosting-community by jadonn. View the logs.


2 years ago

Note: See TracTickets for help on using tickets.