Alexander E. Patrakov
semzx at newmail.ru
Wed Jul 23 07:22:50 PDT 2003
On Wednesday 23 July 2003 16:35, Dagmar d'Surreal wrote:
> On Tue, 2003-07-22 at 11:33, Alexander E. Patrakov wrote:
> > I am trying to use mod_rewrite under Apache 2.0.47. It works, but
> > interferes badly with automatic directory listing generation: I go to
> > http://my.site/xray/labs/ (it is rewritten [PT] to /~someone/for_study/),
> > and the directory listing shows that it is really a listing of
> > http://my.site/~someone/for_study. Even worse, the link up points to this
> > /~someone/ directory!
> > Also some scripts that point to themselves break.
> > Is this the correct behaviour? If not, how to avoid or circumvent this?
> So far as I know that's exactly how it's supposed to work. I mean,
> that's that module's _job_... rewriting the URL. Perhaps things would
> make more sense if you read the man pages on Apache's site, or perhaps
> explained what you expect to happen.
1) I want to allow people in my organization to put their stuff on the web. I
use suexec for their home directories since they want to hide their mysql
passwords, etc. from each other. And this way a vulnerability in one person's
script cannot affect others.
2) They are supposed to tell me if any of their materials is not a draft, so
that I can put a link to thet material. Copying the material into our
DocumentRoot is not acceptable because the owner changes and other users can
see a mysql password embedded in scripts. And my boss does not like to put
links to /~anything on the pages reachable from http://my.site/. I thought
that mod_rewrite is the solution.
RewriteRule /xray/labs/(.*) /~someone/for_study/$1 [PT,L]
3) I want to go to http://my.site/xray/labs/ and see the listing of the remote
directory. I want the string "Index of /xray/labs", not "index of
/~someone/for_study" to appear at the top. And I surely don't want the link
to /~someone/ to appear as the "parent directory". /xray/ will do.
4) Some scripts that reference themselves also put links to /~smth instead of
the location mentioned in request (mostly solved, we just have to tell people
about SCRIPT_URL and SCRIPT_URI).
It has been mentioned that mod_rewrite is the wrong solution here. What's
Alexander E. Patrakov
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-support' in the subject header of the message
More information about the blfs-support