3

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 (eg. Bouquets%20%26%20Loose.html), the redirect does not work. If I escape the % sign(eg. Bouquets\%20\%26\%20Loose.html), the redirect still does not work.

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

1 Answer 1

4

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

Redirect 301 "/Bouquets & Loose.html" http://...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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