Answer the question
In order to leave comments, you need to log in
How to make a "one-time redirect" in nginx?
on the first call,
site1.ru/1.jpg -> redirect 301 site2.ru/2.jpg
on the second+ call, the redirect should not occur,
tell me the finished version?
Answer the question
In order to leave comments, you need to log in
location =/1.jpg {
if ( $cookie_megablah = "" ) {
add_header Set-Cookie megablah=1;
return 301 site2.ru/2.jpg;
}
root ...;
etc;
}
Fix the syntax yourself, I think.
I couldn't make it myself, can you tell me how it should look like?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question