nginx rewrite help

Kevin Castiglione kevincastiglione at gmail.com
Thu Jun 18 18:21:33 MSD 2009


2009/6/18 Igor Sysoev <is at rambler-co.ru>

> On Thu, Jun 18, 2009 at 06:38:54AM -0700, Kevin Castiglione wrote:
>
> > 2009/6/18 Igor Sysoev <is at rambler-co.ru>
> >
> > > On Wed, Jun 17, 2009 at 09:22:46PM -0700, Kevin Castiglione wrote:
> > >
> > > > hei guys
> > > > i want all urls to be re-written as follows:
> > > >
> > > > xx /host/xx
> > > >
> > > > xx is the url full path, it should be written as /domain/xx where
> host is
> > > > the hostname.
> > > >
> > > > for example www.ABCD.COM <http://www.abcd.com/>
> > > >
> > > > /test?1 ---> /ABCD.COM/test?1 <http://abcd.com/test?1>
> > > > is it possible to do this with nginx?
> > > > thank you!
> > >
> > > Should it be redirect or what ?
> > >
> >
> > i dont want it to be a permanent redirect. i just want the url to be
> > rewritten for application processing. i want different domains to be
> handled
> > by same web app an dmy webframe work supports only url-level application
> > mapping. that is why i need this rewrite.
> > thank you
>
> If you use proxing, then
>
> server {
>
>   location / {
>       proxy_pass  http://backend/$host$request_uri;
>    }
>
> }
>
im using fastcgi backend.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090618/abcb1af4/attachment.html>


More information about the nginx mailing list