httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] redirect without changing URL?
Date Fri, 25 Aug 2006 16:40:39 GMT
On 8/25/06, Bing Du <bdu@iastate.edu> wrote:
> > Start here:
> > http://httpd.apache.org/docs/2.2/urlmapping.html
> >
> > What you want is probably a simple Alias.
> >
> > But note that it is best not to have two permanent URLs mapping to the
> > same place.  So you should make one URL or the other be a Redirect.
>
> Thanks for the quick response.  What if I need
> http://www.dept.some.edu/group to go to the overview.html rather than the
> index.html in the /var/www/html/long/path/to/group directory, if adding
> 'overview.html' to DirectoryIndex in the httpd.conf file is not an option?
>  I'd try Alias first. Failing that, I would try mod_rewrite next.  So I
> tried
>
> Alias /group/index.html /var/www/html/long/path/to/group/overview.html
>
> When I go to http://www.dept.some.edu/group, I got page not found.

You could use
AliasMatch ^/group/$ /var/www/html/log/path/to/group/overview.html
Alias /group/ /var/www/html/log/path/to/group/

But why can't you use DirectoryIndex?  This directive can be scoped
inside <Directory> or <Location> sections and can also contain
multiple filenames.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message