301 redirect will not work with %20 in url

evangelion3258 picture evangelion3258 · Jan 4, 2013 · Viewed 10.5k times · Source

I am trying to create this redirect:

Redirect /commercial%20work.html http://nataliearriolaphotography.com/fine-art-photography-prints.html

The problem is that when I first created this page I left a space in the file name. In other words it was "/commercial work.html". In chrome and safari the url reads as above with the %20 in place of the space, but when I create this redirect it does not work. I have also tried the following:

Redirect /commercial work.html http://nataliearriolaphotography.com/fine-art-photography-prints.html

This does not work either. It causes a server error page to appear. Does anyone have any suggestions? Thanks!

Answer

Gerben picture Gerben · Jan 4, 2013

Try adding quotes. So

Redirect "/commercial work.html" http://nataliearriolaphotography.com/fine-art-photography-prints.html