I’m working on a site which has some pretty awful urls to redirect, for example:-
/sites/default/files/files/National%20Commission%20of%20Enquiry%20-%20Intensive%20Alternative%20to%20Custody%20in%20Greater%20Manchester.doc
Doing this (removing the ASCII spaces) results in a 500 error:-
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
Preserving the spaces as %20 simply 404’s. I assume its the ASCII characters that are getting in the way – is there a reliable way to redirect urls such as this one?
Try replacing the %-encoded characters with the characters themselves. Because you have some spaces in there you would need to put the url between quotes (“/sites/…/space here”)
So in your case: