.htaccesshttp-status-code-301

301 redirect will not work with %20 in url


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!


Solution

  • Try adding quotes. So

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