Files in location

Hello,

I would like to set up a rule redirecting the root location to another
address, but to serve files inside this location directly.
I tried the following:
location = / {
rewrite .* http://inter.net permanent;
}

http://intra.net/ is redirected as wanted
http://intra.net/codes.txt is also redirected… but that is not
intended

How to avoid that? SHould I try something with an if or a try_files
directive on the $uri variable?

B. R.

On 1 Fev 2012 05h32 WET, [email protected] wrote:

[1 <multipart/alternative (7bit)>]
[1.1 <text/plain; UTF-8 (7bit)>]
Hello,

I would like to set up a rule redirecting the root location to
another address, but to serve files inside this location directly.
I tried the following: location = / { rewrite .* http://inter.net
permanent; }

location = / {
return 301 http://inter.net;
}

location / {
# serve the files here without a redirect
}

— appa

Thanks,

It appeared that with some other tests my solution was working…
Browser cache troubles, it seems.
Sorry to have bothered you :o\

Thanks anyway,

B. R.