How could I permanently redirect dynamic url with querystrings?
WisdomFusion
nginx-forum at nginx.us
Sun Jun 20 15:06:23 MSD 2010
Gena Makhomed Wrote:
-------------------------------------------------------
> On 19.06.2010 16:53, WisdomFusion wrote:
>
> > #rewrite dynamic url with querystrings
> > if ($args ~* "boardid=[0-9]+&id=([0-9]+)") {
> > set $tid $1;
> > rewrite ^.*$
> http://www2.example.com/thread-$tid-1-1.html
> permanent;
>
> - rewrite ^.*$
> http://www2.example.com/thread-$tid-1-1.html
> permanent;
> + rewrite ^
> http://www2.example.com/thread-$tid-1-1.html?
> permanent;
>
> > #at the end, rewrite undefined urls permanently
> > rewrite ^(.*) http://www2.example.com$1
> permanent;
>
> - rewrite ^(.*) http://www2.example.com$1
> permanent;
> + rewrite ^ http://www2.example.com$request_uri?
> permanent;
>
> --
> Best regards,
> Gena
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
Thanks. ^^
It works perfect. Thanks a lot.
By the way, I always refers to configuration from
http://wiki.nginx.org/NginxHttpRewriteModule, but it's so brief that
some details like this problem I encountered are not included. Where
could I find more detailed reference materials?
V/R,
gavin
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,100268,100493#msg-100493
More information about the nginx
mailing list