2012-04-13 87 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

文件夹和其他文件夹,你想轻易拒绝访问。我不知道黑客能否绕过这些文件,但这是简单的解决方案。试试这个,看看你自己的答案。

相关问题