nginx rewrite help

Edho P Arief edhoprima at gmail.com
Thu Jun 18 08:42:17 MSD 2009


On Thu, Jun 18, 2009 at 11:22 AM, Kevin
Castiglione<kevincastiglione at gmail.com> 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
>
> /test?1 ---> /ABCD.COM/test?1
> is it possible to do this with nginx?
> thank you!

rewrite ^(.*)$ /$host$1;

-- 
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org





More information about the nginx mailing list