I was working on a site where pages had originally been named using an old WYSIWYG editor, with spaces in the filenames. These were being served up OK in the browser, which URL-encoded the space (as an unsafe ASCII character) to %20 :


However when using this URL-encoded format in the .htaccess file, the server generated an error for the 301 Redirect lines:

Redirect 301 /old%20filename%20with%20spaces.htm /nice-clean-new-url/

The correct way to redirect filenames with spaces in .htaccess is by leaving the spaces, and quoting the filename:

Redirect 301 "/old filename with spaces.htm" /nice-clean-new-url/