我正在一个网站上工作,该网站有一些非常糟糕的网址要重定向,例如:-
/sites/default/files/files/National%20Commission%20of%20Enquiry%20-%20Intensive%20Alternative%20to%20Custody%20in%20Greater%20Manchester.doc
这样做(删除 ASCII 空格)会导致 500 错误:-
redirect 301 /sites/default/files/files/National Commission of Enquiry - Intensive Alternative to Custody in Greater Manchester.doc http://www.makejusticework.org.uk/wp-content/uploads/National-Commission-of-Enquiry-Intensive-Alternative-to-Custody-in-Greater-Manchester-1.pdf
将空格保留为 %20 只是 404。我认为它的 ASCII 字符妨碍了它 - 有没有一种可靠的方法来重定向 URL,比如这个?