How to rewrite this correctly?
Glen Lumanau
glen at lumanau.web.id
Thu Jan 29 06:36:19 MSK 2009
-----Original Message-----
From: owner-nginx at sysoev.ru [mailto:owner-nginx at sysoev.ru] On Behalf Of Ask
Bjørn Hansen
Sent: 29 Januari 2009 10:25
To: nginx at sysoev.ru
Subject: Re: How to rewrite this correctly?
>
>On Jan 28, 2009, at 6:52 PM, Glen Lumanau wrote:
>
>> Heres what I already set and works. But not as I expected
>> location /images/stories {
>> rewrite ^(.*)$ http://static.mydomain.com$1 redirect;
>> }
>>
>> When its 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;
Can you please explain me the details about it?
rewrite ^/images/(.*)$ http://static.mydomain.com/files/images/$1 redirect;
Is that correct if i use
rewrite ^/images/stories/(.*)$ http://static.mydomain.com/files/images/$1
redirect; ?
How about rewrite ^/(.*)$ http://static.mydomain.com/files/$1 redirect; ?
--
http://develooper.com/ - http://askask.com/
More information about the nginx
mailing list