Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 569
evangelion3258 Avatar asked Jan 04 '13 20:01

evangelion3258


People also ask

Why is my 301 redirect not working?

The reasons for 301 redirect not working are much more well-defined among WordPress sites. One of the main causes is because you have added the rewrite rules on both the cPanel “Redirects” tool and from your WordPress plugin.

Can you 301 redirect to another domain?

A 301 redirect is a permanent redirect from one URL to another. While they can redirect site page URLs, they can also redirect from one domain to another.


1 Answers

Try adding quotes. So

Redirect "/commercial work.html" http://nataliearriolaphotography.com/fine-art-photography-prints.html
like image 135
Gerben Avatar answered Oct 13 '22 20:10

Gerben