[Nolug] Off topic, Apache 2.x question

From: David John <david_at_digitalsolutions-la.com>
Date: Wed, 24 Aug 2005 14:57:51 -0500 (CDT)
Message-ID: <4049.206.41.39.34.1124913471.squirrel@206.41.39.34>

Hello All,

Scenario:
Given the domain example.com. A user requests any subdirectory on
example.com, say example.com/anydirectory. I would like to rewrite or
redirect all requests from example.com/anydirectory back to the
DocumentRoot of example.com. Essentially, I want to create a one page
domain that returns the user to the DocumentRoot of example.com regardless
of what subdirectory they request. Does that make sense?

Would I use mod_rewrite for this? If so, how? Using
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html as a guide, I
tried using regular expressions but always get redirection limit exceeded
messages or nothing at all.
I'm using something like this for my VirtualHost in httpd.conf:

RewriteEngine On
RewriteRule ^/~(([a-z])[a-z0-9]+)(.*) http://example.com

(I know I'm probably way off.)

I've Googled this one to death. Maybe I'm not searching for the right
stuff for what I'm trying to accomplish? Any help is appreciated.
Thanks.

David John

___________________
Nolug mailing list
nolug@nolug.org
Received on 08/25/05

This archive was generated by hypermail 2.2.0 : 12/19/08 EST