alleyinteractive / wp-alleyvate

Defaults for WordPress sites by Alley.
GNU General Public License v2.0
19 stars 2 forks source link

Disable attachment redirects to files #109

Closed dlh01 closed 1 month ago

dlh01 commented 2 months ago

Description

Although Alleyvate disables attachment pages (see #64), core's default behavior of redirecting attachment URLs to their corresponding files is still enabled. We should disable that behavior, too, so that attachments have no bearing on how frontend requests are routed.

Use Case

When a user visits a URL that matches an attachment's post_name, they should receive a 404 instead of being redirected to the file.

dlh01 commented 1 month ago

110 missed this.