【发布时间】:2011-03-31 16:48:53
【问题描述】:
我有一个来自另一个网站的链接,我无法控制 http://example.com/one two three.exe
正确的网址是http://example.com/one_two_three.exe
注意下划线而不是空格。
我在网上搜索,发现这个代码 sn-p for .htaccess
# Redirect old file path to new file path
Redirect /one%20two%20three.exe http://example.com/one_two_three.exe
我将此 sn-p 添加到文件顶部的预先存在的根 .htaccess 中。
但这似乎不起作用。我的浏览器没有重定向,我得到一个 404 错误页面。
我认为这与原始 URL 中的空格有关,但我不知道如何处理 URL 中的空格。
建议?
【问题讨论】: