Answer the question
In order to leave comments, you need to log in
Determine if a site page exists with a get request?
In short, send a get request:
GET /chek-list-napisaniya-zagolovkov.html HTTP/1.0\n
Host: mxmf.ru\n
Accept-Encoding: gzip, deflate\n
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0)\n
Connection: Keep-Alive\n\n
Connection: close\n\n
HTTP/1.1 404 Not Found
Date: Sat, 03 Sep 2016 20:39:21 GMT
Server: Apache
Content-Length: 353
Connection: close
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /chek-list-napisaniya-zagolovkov.html was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
HTTP/1.1 200 OK
Date: Sat, 03 Sep 2016 20:40:32 GMT
Server: Apache
Last-Modified: Sun, 25 Jan 2015 17:18:46 GMT
ETag: "4a1659d-2c-50d7d36dbc980"
Accept-Ranges: bytes
Content-Length: 44
Vary: Accept-Encoding,User-Agent
Connection: close
Content-Type: text/html
<html>Apache is functioning normally</html>
Answer the question
In order to leave comments, you need to log in
The answer "Apache is functioning normally" instead of the main page of the site hints at the fact that this request is not processed as expected.
Checked - everything works:
Connected to mxmf.ru.
Escape character is '^]'.
GET /chek-list-napisaniya-zagolovkov.html HTTP/1.0
Host: mxmf.ru
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0)
HTTP/1.1 200 OK
Date: Sat, 03 Sep 2016 21:23:38 GMT
Server: Apache
Link: <http://mxmf.ru/?p=914>; rel=shortlink
Set-Cookie: antibot-hostia=true; path=/; domain=mxmf.ru; expires=Sun, 04-Sep-2016 21:23:38 GMT
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Content-Length: 26490
Connection: close
Content-Type: text/html; charset=UTF-8
...
According to the response code, of course: 200 everything is fine, 404 - not found.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question