Re: Apache question

From: Royce Williams <royce@alaska.net>
Date: Sat Jul 24 2004 - 12:04:05 AKDT

Barsalou wrote, On 7/24/2004 11:34 AM:

> I have a site called www.example.com that I want to setup. Part of this
> setup is that there is some stuff stored at
> /var/www/html/webstuff/mike/site1 and stuff setup at
> /var/www/html/webstuff/mike/site2.
>
> To get to these sites now I have to type:
> http://www.example.com/webstuff/mike/site1, etc.
>
> I would like to only have to type:
> http://www.example.com/site1.
>
> How do I do that?
>
> I tried using rewrite, but couldn't get it to work properly.

In general, a good resource is

        http://httpd.apache.org/docs/urlmapping.html

Depending on what you want to do, the "Alias" and "Url Redirection"
chunks will probably be useful. Since you're not redirecting an old
URL but rather just setting up a new one (I think), the Alias stuff
is probably OK for your needs:

"Alternatively, the Alias directive will map any part of the filesystem into the web space. For example, with

     Alias /docs /var/web"

the URL http://www.example.com/docs/dir/file.html will be served from /var/web/dir/file.html. The ScriptAlias directive works the
same way, with the additional effect that all content located at the target path is treated as CGI scripts."

What error(s) were you getting with mod_rewrite? What you're wanting
to do is probably best served by that, because it's neither outside
the DocumentRoot nor a redirect that you're after -- just a permanent
alias.

-royce

-- 
------------------------------------------------------------------------
Royce D. Williams                                    IP Engineering, ACS
personal: [first]@alaska.net                      PGP: 3FC087DB/1776A531
work: [first.last]@acsalaska.net             http://www.tycho.org/royce/
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sat Jul 24 12:04:01 2004

This archive was generated by hypermail 2.1.8 : Sat Jul 24 2004 - 12:04:03 AKDT