rewrite rule problem

Oleksandr V. Typlyns'kyi wangsamp at gmail.com
Sat Oct 23 11:35:33 MSD 2010


Today Oct 23, 2010 at 07:51 Todd HG wrote:

> I am trying to write a rewrite rule to forward:
> http://images.hollywoodgrind.com:9000/images/2008/7/vanessa-hudgens-and-zac-efron-vacation-part-2-1.jpg
> to the new URL:
> http://www.hollywoodgrind.com/images/2008/7/vanessa-hudgens-and-zac-efron-vacation-part-2-1.jpg
> In the /images directory location.
> 
> I need to forward any image traffic that comes to
> images.hollywoodgrind.com:9000 to www.hollywoodgrind.com.

  server {
   listen 209.62.71.66:9000;
   server_name images.hollywoodgrind.com;
   ...
   location /images {
    rewrite ^ http://www.hollywoodgrind.com$request_uri? permanent;
   }
  ...
  }

-- 
WNGS-RIPE



More information about the nginx mailing list