On Thu, Jun 18, 2009 at 11:42 AM, Edho P Arief<edhoprima@gmail.com> wrote:
> On Thu, Jun 18, 2009 at 11:22 AM, Kevin
> Castiglione<kevincastiglione@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;
>
add redirect/permanent for external redirect.
rewrite ^.* /$host$uri;
can also be used (less captures hence faster?)
--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org