Re: [Nolug] Off topic, Apache 2.x question

From: Brett D. Estrade <estrabd_at_mailcan.com>
Date: Thu, 25 Aug 2005 12:03:19 -0500
Message-Id: <1124989399.14335.241480560@webmail.messagingengine.com>

If the directories do not exist, why not just set up a 404 page that is
actually your main index?

Brett

On Wed, 24 Aug 2005 14:57:51 -0500 (CDT), "David John"
<david@digitalsolutions-la.com> said:
> 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

--
~Sedit qui timuit ne non succederet~
___________________
Nolug mailing list
nolug@nolug.org
Received on 08/25/05

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