I have this in the .htaccess file:

Redirect 301 /product-installer  https://download.testsite.com/installers/My%20Product%20v3.0.0.0.exe

It's working correctly of Firefox as when you click the URL Firefox correctly downloads the file as:

My Product v3.0.0.0.exe

However on IE/Edge it downloads and saves as:


I'm wondering if I'm doing something wrong here or is IE/Edge just bugged?

  • And simply leaving the conversion of the spaces up to the client by enclosing the target URL with "'s? i.e. use Redirect 301 /product-installer "https://download.testsite.com/installers/My Product v3.0.0.0.exe" – HBruijn Sep 24 '18 at 15:31
  • Generally you should avoid using spaces in URLs. They are considered unsafe by the Network Working Group as they cause all kinds of problems, this being one of them. Notice for example that in the serverfault URL of your post the spaces are replaced by dashes? There is a reason for that. Though for this case you could use "" as @HBruijn suggested. – Broco Sep 24 '18 at 15:38

This is normal behaviour for IE/Edge. Some web browsers like Firefox, file download names have %20 replaced with a white-space. Other web browsers like IE/Edge, file download names a white-space is replaced with %20.

On the Save As windows users can rename %20 into white-space. Or do the same via the file browser.


Using white-space in URLs can work, but they render as %20. Hyphens and underscores are preferred word separators accessing resources via URL. Try to avoid white-space in file names if possible.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.