2012-04-13 131 views

回答

0

這是沒有編輯.htaccess文件一個簡單的解決方案。

在您的文件夾中創建一個新的index.html或index.php文件,並將這些行寫在主體上。

在PHP:

<?php  
     header("Location:../index.php"); 
    ?> 

在HTML:

<!DOCTYPE HTML> 
<html lang="en-US"> 
<head> 
    <meta charset="UTF-8"> 
    <meta http-equiv="refresh" content="1;url=http://www.yourDomainName.com"> 
    <script language="javascript"> 
     window.location.href = "http://youDomainName.com" 
    </script> 
    <title>Page Redirection</title> 
</head> 
<body> 
    If you are not redirected automatically, follow the <a href='http://www.yourDomainName.lk'>link to Your domain name home page</a> 
</body> 
</html> 

從這樣可以阻止

www.yourDomain.com/img

文件夾

www.yourDomain.com/css

文件夾和其他文件夾,你想輕易拒絕訪問。我不知道黑客能否繞過這些文件,但這是簡單的解決方案。試試這個,看看你自己的答案。

相關問題