Web Servers on Unix and Linux - Rewriting /foo to /~user/foo

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > February 2005 > Rewriting /foo to /~user/foo





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Rewriting /foo to /~user/foo
Michael F Gordon

2005-02-13, 5:48 pm

Server: Apache on Solaris

We have a user who wants to run a low-traffic WIKI from their home
directory. I've set up a virtual host wiki.domain.name with
DocumentRoot set to /home/user/public_html/wiki to hide the /~user/
part, but this makes the server run the scripts as the web server user
rather than the user whose directory the scripts are in. I thought
about using mod_rewrite to put /~user/wiki back - accessing the scripts
with this URL gets them run as the user as expected - but I can't see
any way to get the server to reinterpret the result of a rewrite.
Adding [R] to the rule to make it send a redirect works but exposes
/~user/wiki again.

Any ideas?


Michael Gordon
--
Quidquid latine dictum sit, altum viditur.
André Malo

2005-02-14, 2:47 am

* Michael F Gordon <mfg@ee.ed.ac.uk> wrote:

> Server: Apache on Solaris
>
> We have a user who wants to run a low-traffic WIKI from their home
> directory. I've set up a virtual host wiki.domain.name with
> DocumentRoot set to /home/user/public_html/wiki to hide the /~user/
> part, but this makes the server run the scripts as the web server user
> rather than the user whose directory the scripts are in. I thought
> about using mod_rewrite to put /~user/wiki back - accessing the scripts
> with this URL gets them run as the user as expected - but I can't see
> any way to get the server to reinterpret the result of a rewrite.
> Adding [R] to the rule to make it send a redirect works but exposes
> /~user/wiki again.


[PT].

nd
Michael F Gordon

2005-02-15, 5:50 pm

=?ISO-8859-1?Q?Andr=E9?= Malo <auch-ich-m@g-kein-spam.com> writes:
>[PT].


Thanks. Now that I know what this flag does, the description of it in
the mod_rewrite manual makes a bit more sense. Am I right in thinking
that in this case it ensures that mod_user sees something it can rewrite
rather than whatever it sees without [PT]? What does it see without
[PT] anyway?


Michael
--
Quidquid latine dictum sit, altum viditur.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com