httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noah <>
Subject Re: [users@httpd] Adding Alias without Restarting Apache
Date Tue, 08 Mar 2005 16:17:46 GMT
On Mon, Mar 07, 2005 at 08:11:45PM -0800, anthony G wrote:
> I'am running Apache 2.0.53 on Windows 2003 Web Edition.  I need to
> know how to setup multiple Alias 's without having to restart Apache
> every time I add them to httpd.conf file.
> For Example I Know I can add this to my Virtual Host in httpd.conf but
> then I would have to restart Apache for it to work.
> Alias /UserX "E:\Websites\UserX\ROOT"

Sounds like a job for mod_rewrite. You'll need to ensure that you're
loading, and then add something like the following (keeping in mind that I'm
not a win32 guy, so I'm guessing a bit):

RewriteEngine on
RewriteRule /([^/]+)/(.*) E:\Websites\$1\ROOT\$2 [L]

This will work if all incoming requests are in the form:

If you have *any* directories under '/' that are *not* user directories,
then a bit more finagling will be required; something along the lines

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/nonuserdirectory
RewriteCond %{REQUEST_URI} !^/another_nonuserdirectory
RewriteRule /([^/]+)/(.*) E:\Websites\$1\ROOT\$2 [L]

(both these rules are untested; Caveat Administrator)

Obviously, the precise recipe will be site-dependant. =)

Some mod_rewrite links:

I'd recommend playing with this on a test system with RewriteLogLevel
cranked up to 9 until you get the behavior you want.


<huey> dd of=/dev/fd0 if=/dev/flippy bs=1024
<huey> ^^^ Making Flippy Floppy

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message