我无法搞清楚这一点。我们刚刚通过主机gator切换到VPS主机,上传了一个网站。图像和css文件没有404和403错误。所有路径都正确,所有文件都已上传。这是开发网址: 198.20.251.19/~lstorage /
答案 0 :(得分:0)
您的页面未正确链接到样式表或javascripts。 路径似乎不正确。
<link href="style.css" rel="stylesheet" type="text/css">
报告:
<!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 /~lstorage/style.css 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>
我认为样式表的路径不是/~lstorage/style.css。 只需更改为正确的文件路径。
页面上嵌入的图像不会丢失,它们在服务器级别被阻止。
<img src="images/slide/bigstorage.jpg" width="290" height="200" alt="Plenty of space to store everything">
报告:
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /~lstorage/images/slide/bigstorage.jpg
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>
<强>解强>
文件夹和文件权限不正确。如果您使用的是php,则chmod将权限更改为具有读取权限。
600 : Only owner can read/write
644 : Only owner can write, others can read
666 : All uses can read/write.