Try specifying the file, like index.html to redirect to.
I've also seen at the end of the rewrite rule [L] , whic I do not know if
it is needed there or not....
Then you may want to exclude the index.html from the regular expression....
I don't know anything about rewrites except that they are higher magic....
Petri
> 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
>
___________________
Nolug mailing list
nolug@nolug.org
Received on 08/25/05
This archive was generated by hypermail 2.2.0 : 12/19/08 EST