vburshteyn

Igor Sysoev is at rambler-co.ru
Thu Jul 9 23:58:20 MSD 2009


On Thu, Jul 09, 2009 at 03:33:14PM -0400, vburshteyn wrote:

> Igor, thanks, bolshoye spasibo.  if you dont mind, one more question on that topic  - how would u do this?
> 
> ../  this needs to be redirected to
>  
> ...//
> 
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,3863,3947#msg-3947

Forum's maillist gateway cut some characters:

----------
[affiliate].[www2].[mysite.com]/[boxoffice][what ever the string in here] this needs to be redirected to

[affiliate].[boxoffice].[www2].[mysite.com]/[boxoffice]/[what ever the string in here]
----------

became

----------
 ../  this needs to be redirected to
  
 ...//
----------

If you want do some generic redirect rule, then

   server {
        server_name  affiliate.www2.mysite.com;

        location ~ ^(/[^/]+) {
            set      $name  $1;
            rewrite  ^  http://affiliate.$name.www2.mysite.com$request_uri?;
        }
   }


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list