How to make the html file available on the domain if the whole domain was redirected with 301?

There is a file blababla.html
It is located at the address site.ru/blababla.html
But site.ru is permanent redirect site2.ru

How to remove a redirect from site.ru/blababla.html on site2.ru?
July 2nd 19 at 14:21
2 answers
July 2nd 19 at 14:23
Solution
Post location responsible for the file above the location with redirecting.
Thanks, can code? :-) - virginia commented on July 2nd 19 at 14:26
server {
...
location = /blablabla.html {
root /var/www/foo;
}

location / {
return 301 http://site2$request_uri;
}
} - Greyson.Erdm commented on July 2nd 19 at 14:29
I have earned your option, in the end, it looks like this:

server {

listen 80;
server_name sithi www.сайт.ru;

location = /блабла.html {
root /var/www/website;
}

location / {
return 301 http://сайт$request_uri;
}

} - virginia commented on July 2nd 19 at 14:32
July 2nd 19 at 14:25
location = /blababla.html { 
 ... 
}


Note the "=" - it represents an exact matching URL and has the highest priority when testing.

Find more questions by tags robots.txtNginx