Welcome! Log In Create A New Profile

Advanced

Re: How could I permanently redirect dynamic url with querystrings?

Gena Makhomed
June 19, 2010 10:34AM
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@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

How could I permanently redirect dynamic url with querystrings?

WisdomFusion June 19, 2010 09:53AM

Re: How could I permanently redirect dynamic url with querystrings?

Gena Makhomed June 19, 2010 10:34AM

Re: How could I permanently redirect dynamic url with querystrings?

WisdomFusion June 20, 2010 07:06AM

Re: How could I permanently redirect dynamic url with querystrings?

Gena Makhomed June 20, 2010 08:44AM

Re: How could I permanently redirect dynamic url with querystrings?

WisdomFusion June 21, 2010 09:58PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 163
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready