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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Centos 5.2, Apache 2.2.3

I want to configure Apache to redirect any URL under to the single URL

How can I set this up with Apache? I have

LoadModule rewrite_module modules/

but I'm not sure how to actually use this and I can't find a really simple example; I assume I set up a new virtual host with some form of rewrite directive, but how is this done?

share|improve this question
up vote 2 down vote accepted

put a .htaccess in the document root and then put this in it :

RewriteEngine on
RewriteRule $ [L]

or you can do the above in the VHost definition.

share|improve this answer
Perfect - I did this in the vhost definition. – DrStalker Mar 23 '10 at 0:48

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.