Glen_L
1
Hello!
I have a directory images/stories (using joomla)
I need to rewrite this into my other subdomains
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 ?
Thank’s a lot before
Glen_L
2
On Jan 28, 2009, at 6:52 PM, Glen L. 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;
Glen_L
3
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of
Ask
Bjørn Hansen
Sent: 29 Januari 2009 10:25
To: [email protected]
Subject: Re: How to rewrite this correctly?
On Jan 28, 2009, at 6:52 PM, Glen L. 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;
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;
?