A
A
Artyom2016-11-25 02:29:52
Nginx
Artyom, 2016-11-25 02:29:52

How to make an html file available on a domain if the entire domain is on a 301 redirect?

There is a file blababla.html
It is located at site.ru/blababla.html
But site.ru has a permanent redirect to site2.ru
How to remove the redirect from site.ru/blababla.html to site2.ru?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
ky0, 2016-11-25
@ixley

Place the location responsible for the file you need above the location with the redirect.

E
el777, 2016-11-25
@el777

location = /blababla.html { 
  ... 
}

Note the "=" - this denotes an exact URL match and has a higher priority when checking.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question