httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Galić <i.ga...@brainsware.org>
Subject Re: [users@httpd] New to list - Redirect, Alias or Rewrite?? Very confused...
Date Wed, 05 Jan 2011 13:26:30 GMT

----- "Robert Van Horn" <rvh@abcreek.wisequackranch.com> wrote:

> Change the name of New_Web to Old__Web.
> Don't forget to cp Old_Web to Old_Web.old first.

Bob, I'm not sure how that makes sense in the context of Doug's
question..

> bob
> 
> On 1/4/11 11:59 AM, doug@aiphone.com wrote:
> > Hi all,
> > I am attempting to have the Apache Server 2.0 handle the following
> request
> > for me:
> >
> > When a visitor visits http://mydomain.com/OLD_Web App/, I would like
> them
> > to be automatically redirected to http://mydomain.com/New_Web App/
> >
> > Both OLD and NEW Web App folders live in the same doc root and are
> at the
> > same level in the folder tree - ie right off of root.
> >
> > I have tried both Alias commands and Redirect commands and nothing
> seems to
> > work. I have restarted Apache on each change.

What have you tried? Why not just tell us:

I've tried using:

RedirectMatch "^/OLD_Web App(/?.*)" "http://mydomain.com/New_Web App$1"

But that resulted in: ....
(Note, the above redirect *should* actually work :)

> > What is the best way to accomplish this and is there something I am
> > missing. I am using both the O'Reilly Apache Cookbook and the
> Apache.org
> > for examples and they all sound similar. From what I have read,
> Alias seems
> > to be for the purpose of referencing files outside of the doc root,
> this is
> > not the case for me. Redirect seems to be for redirecting to 
> different
> > server - also not the case.
> >
> > Any tips would be awesome.

Read the documentation of the Directives you're trying to use ;)

http://httpd.apache.org/docs/current/mod/mod_alias.html#redirect
http://httpd.apache.org/docs/current/mod/mod_alias.html#redirectmatch
http://httpd.apache.org/docs/current/mod/mod_alias.html#alias
http://httpd.apache.org/docs/current/mod/mod_alias.html#aliasmatch

For rewrite stuff I recommend the /trunk/ docs:

http://httpd.apache.org/docs/trunk/rewrite/

> >
> > Thanks,
> > Doug Niman
> > Information Services Manager
> > Senior Network Administrator
> > Aiphone Corporation


i

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/

---------------------------------------------------------------------
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