nginx rewrite help

Kevin Castiglione kevincastiglione at gmail.com
Thu Jun 18 17:37:37 MSD 2009


On Wed, Jun 17, 2009 at 10:09 PM, Edho P Arief <edhoprima at gmail.com> wrote:

> >>
> >> add redirect/permanent for external redirect.
> >>
> >> rewrite ^.* /$host$uri;
> >>
> >> can also be used (less captures hence faster?)
> >>
>
> here's the complete block
>
> location ~ ^(?!/www\.abcd\.com) {
>  rewrite ^.*$ /$host$uri;
> }
>
hi edho,
thanks a lot for this. does $host represent www.abcd.com or abcd.com?
thanks again!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090618/ba87bdbc/attachment.html>


More information about the nginx mailing list