Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to forward all requests to a particular hostname to a specific URL.

My virtual host entry looks like:

<VirtualHost *:80>
    RedirectPermanent /

This works for anyone going to I am trying to add an error handler:

ErrorDocument 404

so that any and all requests go to the same server. The problem is that if I request then the end result is a request to I tried setting the error document to but it ignored the ? and still redirected to /path/foo

How do I prevent the path from being added to the error URL?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Maybe you just need RedirectMatch permanent ^ instead of RedirectPermanent or ErrorDocument.

share|improve this answer

Your Answer


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.