Answer the question
In order to leave comments, you need to log in
How to disable one of the url addresses?
Greetings! The task may sound crazy, but it exists
There is a domain.com address and there is a domain.com/folder/ address | domain.com/textfile.txt
It is necessary to completely hide the domain.com address, i.e. so that the browser gives an ERR_NAME_NOT_RESOLVED (dnserror) error, but the other two addresses work normally.
ps It's all on the same domain.
I can not figure out which way to dig, I will be grateful for any advice)
Answer the question
In order to leave comments, you need to log in
This cannot be done because these are different parts of the process. DNS resolve knows nothing about uri and http. The reverse is also true - if we are processing an http request, then dns resolve has already been successfully completed and we cannot get this error
Simulate the appropriate error page. Preferably considering User-Agent
.
None. If the browser cannot get the IP of the server by the domain name, then it will not be able to reach any content that lies on this domain.
i.e. for the browser to give an error ERR_NAME_NOT_RESOLVED (dnserror)For your task by URL, this is not possible. If to do inaccessible, then all domain entirely.
I can not figure out which way to dig, I will be grateful for any advice)towards the web server. For example, Nginx has a special code 444 to close the connection.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question