Possible bug with URLRead
This is an incomplete answer, but it should help. I can reproduce on Windows 7. Using Fiddler it is easy to see that URLFetch
issues this request:
GET /~ppzphy/ HTTP/1.1
while URLRead
issues a this one:
GET /%7Eppzphy/ HTTP/1.1
Unfortunately, I didn't find a way to make URLRead work for that address.
Don't know how to automatically avoid that but it seems that everything which is considered "Path"
or "Query"
part of the url is automatically URLEncoded
.
This works on Windows:
URLRead[<|"Scheme" -> "http", "Domain" -> "www.nottingham.ac.uk/~ppzphy/"|>, "Content"]
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
<html>
<head>
<title>Your Page Title</title>
<meta http-equiv=\"REFRESH\" \
content=\"0;url=http://www.nottingham.ac.uk/physics/\"></HEAD>
<BODY>
Redirecting to<br><br>
<a href=\"http://www.nottingham.ac.uk/physics/\">http://www.\
nottingham.ac.uk/physics/</a>
</BODY>
</HTML>
It seems like building the URL like so helps:
URLRead[
HTTPRequest[
URL["http://www.nottingham.ac.uk"],
<|"Path" -> "~ppzphy/"|>
]
]
This appears to avoid having URLEncode
interfere.