How to rewrite this correctly?
Ask Bjørn Hansen
ask at develooper.com
Thu Jan 29 06:25:17 MSK 2009
On Jan 28, 2009, at 6:52 PM, Glen Lumanau wrote:
> Here’s what I already set and works. But not as I expected
> location /images/stories {
> rewrite ^(.*)$ http://static.mydomain.com$1 redirect;
> }
>
> When it’s accessed by users, it will redirect me to http://static.mydomain.com/images/stories
>
> How can I rewrite it into http://static.mydomain.com/files/images ?
Here are a few variations:
rewrite ^/images/(.*)$ http://static.mydomain.com/files/images/$1
redirect;
rewrite ^/(.*)$ http://static.mydomain.com/files/$1 redirect;
--
http://develooper.com/ - http://askask.com/
More information about the nginx
mailing list