You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Navigate to General Settings > Links > Redirect Orphan Attachments.
Notice that the default value is set to the homepage URL.
Enable the "Redirect Attachments" module.
Upload an image file, e.g., http-auth.png.
Perform the following scenarios:
Scenario A: The media attachment URL becomes https://example.com/http-auth/.
Scenario B: Create a new post with the same permalink (http-auth), resulting in:
Post URL: https://example.com/http-auth/.
Media attachment URL: https://example.com/http-auth/http-auth/.
If the post (http-auth) is deleted and you attempt to set up a redirection from https://example.com/http-auth/ to a new URL, such as https://example.com/new-url/, the redirection module exhibits inconsistent behavior:
Unattached Media: Redirects to the homepage.
Attached Media: Redirects to the original post instead of the new URL.
Problem Summary
The issue stems from the default behavior of the "Redirect Orphan Attachments" setting for non-attached media, which assigns the homepage URL by default.
Additionally:
URLs like https://example.com/http-auth/http-auth/ are not handled by the redirection module, further complicating user workflows.
Redirection to homepage cause frustration. Hard to debug attachment redirection due to unclear message in header x-redirected-by: rankmath, suggest you to kindly replace it with something else if possible.
Expected Behavior
When a redirection rule is applied (e.g., https://example.com/http-auth/ to https://example.com/new-url/):
Unattached media should respect the redirection rule instead of defaulting to the homepage.
Attached media should also follow the redirection rule, regardless of its association with a post.
Suggested Fix
Ensure that the "Redirection Module" of Rank Math takes priority over the attachment media redirection settings for both attached and unattached media. This is crucial for scenarios where a user uses a common featured image and post name and needs to redirect to a new post after deleting the original.
Verify that the redirection module consistently applies custom redirection rules.
Note: While the handling of URLs like https://example.com/http-auth/http-auth/ is not the primary focus of this report, it may still require attention to improve consistency and user expectations with Redirection Module.
Let me know if further clarification or testing is required!
The text was updated successfully, but these errors were encountered:
Steps to Reproduce
Set up the following environment:
Navigate to General Settings > Links > Redirect Orphan Attachments.
Enable the "Redirect Attachments" module.
Upload an image file, e.g.,
http-auth.png
.Perform the following scenarios:
https://example.com/http-auth/
.http-auth
), resulting in:https://example.com/http-auth/
.https://example.com/http-auth/http-auth/
.If the post (
http-auth
) is deleted and you attempt to set up a redirection fromhttps://example.com/http-auth/
to a new URL, such ashttps://example.com/new-url/
, the redirection module exhibits inconsistent behavior:Problem Summary
The issue stems from the default behavior of the "Redirect Orphan Attachments" setting for non-attached media, which assigns the homepage URL by default.
Additionally:
https://example.com/http-auth/http-auth/
are not handled by the redirection module, further complicating user workflows.x-redirected-by: rankmath
, suggest you to kindly replace it with something else if possible.Expected Behavior
When a redirection rule is applied (e.g.,
https://example.com/http-auth/
tohttps://example.com/new-url/
):Suggested Fix
Note: While the handling of URLs like
https://example.com/http-auth/http-auth/
is not the primary focus of this report, it may still require attention to improve consistency and user expectations with Redirection Module.Let me know if further clarification or testing is required!
The text was updated successfully, but these errors were encountered: