admin管理员组文章数量:1426072
I sent an email to some folks today with a link to a word document hosted on wordpress. The URL in the email is something like:
www.mycompany/media/2018/06/somedocument.docx
Unfortunately, somedocument.docx actaully resides at:
www.mycompany/media/2018/05/somedocument.docx
When people click the link in the email, they get a 404. We have tried a 301 redirect from one to the other, but that doesn't seem to work. I'm assuming that's because it's a direct link to a file and not a normal HTTP request?
We have already sent a follow-up email with the correct link, but we'd like to fix the issue as well so that when someone clicks the original link in the email, they get redirected to the actual document instead of a 404. Does anyone know how to accomplish this? Thanks.
I sent an email to some folks today with a link to a word document hosted on wordpress. The URL in the email is something like:
www.mycompany/media/2018/06/somedocument.docx
Unfortunately, somedocument.docx actaully resides at:
www.mycompany/media/2018/05/somedocument.docx
When people click the link in the email, they get a 404. We have tried a 301 redirect from one to the other, but that doesn't seem to work. I'm assuming that's because it's a direct link to a file and not a normal HTTP request?
We have already sent a follow-up email with the correct link, but we'd like to fix the issue as well so that when someone clicks the original link in the email, they get redirected to the actual document instead of a 404. Does anyone know how to accomplish this? Thanks.
Share Improve this question asked Jun 11, 2019 at 15:14 Adam RosenscruggsAdam Rosenscruggs 31 bronze badge 2- Do you have access to an .htaccess file?? – ChristopherJones Commented Jun 11, 2019 at 15:16
- I didn't think to check - I'm saying "I" here but really this is a colleague of mine. Let me grab the WP credentials and take a look myself, I'm sure we do. – Adam Rosenscruggs Commented Jun 11, 2019 at 15:19
1 Answer
Reset to default 0If you have access to the .htaccess file, a quick 301 redirect should fix that for yah!
Redirect 301 /media/2018/06/somedocument.docx https://www.mycompany/media/2018/05/somedocument.docx
(If you don't there are other ways to handle it inside the theme if you need to.)
本文标签: 301 Redirect Link to Media
版权声明:本文标题:301 Redirect Link to Media 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745413614a2657581.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论