Rewrite rule problem

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.

Any help would be much appreciated.

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

Thank you Oleksandr. That works perfectly.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs