Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

There is an old page with a space in the filename, and this is no longer found on the website. So I need to redirect this page to another page using a 301 redirect in .htaccess.

If I place the filename directly into .htaccess (Bouquets%20%26%20Loose.html), the redirect does not work. If I escape the % sign like this (Bouquets\%20\%26\%20Loose.html), the redirect still does not work.

How do I get this redirect to work in .htaccess? Thanks.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Found the answer: it is to enclose the URL in " and use the non-encoded characters. eg:

Redirect 301 "/Bouquets & Loose.html" http://...
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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