You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rob Hartill <ro...@imdb.com> on 1996/05/25 05:08:35 UTC

Alias and ScriptAlias suggestion (fwd)

not acked


Sender: jwk@aplexus.jhuapl.edu
Message-Id: <31...@aplexus.jhuapl.edu>
Date: Fri, 24 May 1996 13:18:28 -0400
From: "John W. Kulp" <jw...@aplexus.jhuapl.edu>
Organization: Land'O lost
X-Mailer: Mozilla 2.0 (X11; I; HP-UX A.09.03 9000/735)
Mime-Version: 1.0
To: apache-bugs@mail.apache.org
Cc: John.Kulp@jhuapl.edu
Subject: Alias and ScriptAlias  suggestion
X-Url: http://www.apache.org/info.html
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I was hacking around srm.conf to get Alias and ScriptAlias more flexible
... (I'm supporting a couple of projects that use your httpd and I don't
want to keep multi copies of srm.conf ) and notice that it wouldn't take
relative
paths to DocumentRoot, which is what I want .. then I could set
DocumentRoot
to whatever and do this: 

Alias /icons/                           db/httpd/icons/
Alias /NWP/                             db/pubs/NWP/
Alias /EQUIPMENT_DESCRIPTIONS/
db/training/EQUIPMENT_DESCRIPTIONS/
Alias /about/                           cdkdb/export/about/
Alias /help/                            cdkdb/export/help/
Alias /access/                          db/httpd/access/

etc .... there is a bunch ...

so, in mod_alias.c I found this comment ... in the add_alias() ...

/* XX r can NOT be relative to DocumentRoot here... compat bug. */
so ... I changed
    new->real = r;
and replaced it with this ...
    new->real = is_directory (r) ? r :
server_root_relative(cmd->pool,r);

it was quick and it does the trick ... but ... a couple of questions 

should i persue this ?? 

if so ... shouldn't the call be document_root_relative() ??? 

should i write document_root_relative() ???
should i use char *document_root (request_rec *); instead ??
is there an API to get document_root ??? that says Use this !!

I'll be happy to do it !!!

John

----- End of forwarded message from John W. Kulp -----

-- 
Rob Hartill (robh@imdb.com)
The Internet Movie Database (IMDb)  http://www.imdb.com/
           ...more movie info than you can poke a stick at.