Welcome! Log In Create A New Profile

Advanced

Re: rewrite scheme for url redirect

All files from this thread

File Name File Size   Posted by Date  
img_rewrite.tar.bz2 6.8 KB open | download Antoine BONAVITA 01/27/2011 Read message
nginx.conf 1.3 KB open | download Antoine BONAVITA 01/27/2011 Read message
António P. P. Almeida
January 27, 2011 09:40AM
On 27 Jan 2011 14h17 WET, nginx-forum@nginx.us wrote:


> Because the regexp you posted has curly braces. So, following nginx
> wiki (http://wiki.nginx.org/HttpRewriteModule#rewrite) i tried to
> wrap it into both single and double quotes but with no result:

I overlooked that :(

> location /oldfolder { rewrite
> '^/oldfolder/(\d{2})(\d{2})(\d{2})_(\d)\.jpg$'
> http://images.site2.com/newfolder/$1/$2/new_images/$1$2$3/$1$2$3_image_$4_large.jpg?
> permanent; }
>
> location /oldfolder { rewrite
> "^/oldfolder/(\d{2})(\d{2})(\d{2})_(\d)\.jpg$"
> http://images.site2.com/newfolder/$1/$2/new_images/$1$2$3/$1$2$3_image_$4_large.jpg?
> permanent; }
>
> Nginx doesn't redirect my uri requests, so the problem still
> remains...

I suggest you check the logs and/pr enable the debug flag and trace
Nginx request processing. It will tell what's really going on. The
above regex does capture the patterns you want, so something else must
be creating the problems.

--- appa


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

rewrite scheme for url redirect

sevy January 26, 2011 04:11PM

Re: rewrite scheme for url redirect

Antoine BONAVITA January 26, 2011 04:42PM

Re: rewrite scheme for url redirect

sevy January 26, 2011 04:47PM

Re: rewrite scheme for url redirect

António P. P. Almeida January 26, 2011 05:18PM

Re: rewrite scheme for url redirect

sevy January 26, 2011 05:58PM

Re: rewrite scheme for url redirect

António P. P. Almeida January 27, 2011 09:40AM

Re: rewrite scheme for url redirect Attachments

Antoine BONAVITA January 27, 2011 04:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 170
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready