0
我創建一個小網站,我想知道,因爲我對HTTP頭的一些經驗,如果它的安全使用這樣的記錄算法:只在php上重定向非登錄用戶是否安全?
if(! isset($_SESSION["user"]) {
header("location : logout.php");
}
// and here i start my web page if the conditin above is not satisfied
<html> ........
我認爲這不是因爲重定向可以被Web客戶端忽略不是嗎?
只有當您輸出更多隻有授權人員應該看到的內容時,它纔不安全。如果客戶端忽略重定向,並輸出受保護的內容,他們將能夠看到它。 –