如何在 mod_alias 中的 URL 路径中使用空格重定向指令?

发布于 2024-08-15 10:25:41 字数 368 浏览 4 评论 0原文

链接文本,我也遇到了包含空格的文件路径的问题。有人告诉我只需将完整路径括在引号中,这应该可行,但我不断在网站站长工具错误日志中将此页面标记为未找到:

redirect 301 /"News/Press Releases/Press_Release_Update_Oct_2006.pdf" /index.html

仍然给我一个 404。

谢谢马丁

Following on from link text, I've also got problems with file paths that contain spaces. I was told to simply enclose the full path in quotes, and that should work, but I keep getting this page marked up in my Webmaster Tools error log as not being found:

redirect 301 /"News/Press Releases/Press_Release_Update_Oct_2006.pdf" /index.html

still gives me a 404.

Thanks Martin

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

靖瑶 2024-08-22 10:25:41

您是否尝试过将引号放在 / 之前?

redirect 301 "/News/Press Releases/Press_Release_Update_Oct_2006.pdf" /index.html

Have you tried putting the quote before the /?

redirect 301 "/News/Press Releases/Press_Release_Update_Oct_2006.pdf" /index.html
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文