I'm trying to fix an issue on a client's site. The permalink for an image is site.com/Resources while a category is site.com/resources -- I've deleted and reuploaded the image to change the permalink, but the site is still redirecting /Resources to the old image url. I've cleared the object and static caches on the server and flushed the permalink structure in WP. How can I make it stop??

I have tried:

  • Setting up a PrettyLink redirect for /Resource (breaks category page)
  • Setting up a PrettLink for image url (doesn't redirect)
  • Creating a dummy page with a custom permalink that matches the file name (shows 404)

Any insights/ideas?

  • You mentioned it's still redirecting Resources do you mean it's redirecting the category to the image? Are those full URLs? Is this with Pretty link or is that plugin something you installed after discovering this to try and fix the problem? The question isn't very clear, explicit rather than implied/inferred examples would be a big help. Use the edit link to improve the question to provide as much information as possible, including full examples ( you can swap the domain for example.com to protect client privacy )
    – Tom J Nowell
    Aug 22, 2023 at 15:09
  • Those are explicit examples -- I swapped the url for "site.com" in the initial references. WP is differentiating the two based on capitalization. site.com/resources is working correctly and leading to the category. site.com/Resources is still trying to direct to the now missing image because the title was set as "Resources" when uploaded. I would like both to direct to the category regardless of capitalization, I just can't seem to get WP to stop looking for the image.
    – csampson42
    Aug 22, 2023 at 15:31
  • hmmm Resources and resources are 2 totally separate URLs, I know we as people know R and r are the same letter but unless you explicitly write code to make it do that then they will still be considered different URLs. It's very likely WordPress is showing you a 404 because there is nothing with the slug Resources, and the fact there used to be an attachment there is purely a coincidence. If WP was trying to find the original attachment it would have redirected, not 404'd, afterall how would WordPress know? Unless it was in the trash it wouldn't know, and there's no code to do that anyway
    – Tom J Nowell
    Aug 24, 2023 at 9:43
  • also I mean explicit as in explicitly stating that A redirects to B, C redirects to D, etc. Right now you refer to URLs that are never shared in your question, e.g. the old image URL but no new image URL, and you never actually state which one maps to which directly, it's implied/assumed/inferred/ambiguous, the reader has to process the entire question then use some logic and make a leap and hope they reached the right interpretation. Specifically the redirect, your question implies that /Resources is the old URL, but then says that visiting it redirects to the old URL, it's confusing
    – Tom J Nowell
    Aug 24, 2023 at 9:45


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.