Avoid calling some files directly

xiaoxiao2021-03-06  93

In our website, some files in some directories do not allow customers to access them directly through the URL, so we need to use some ways to limit, and implement this feature:

.htaccess file established a .htaccess file

------------------------------------------------

# Options The .htaccess Files in Directories Can Override.

# Edit apache / conf / httpd.conf to allow allowoverride in .htaccess

# Allowoverride authconfig

# S t directory list from being shown

Options -indexes

# Controls Who Can Get Stuff from this Server.

ORDER DENY, ALOW

Deny from all

Allow from localhost php How does it achieve

Header ("Location: Index.php");

DIE ();

}

?>

转载请注明原文地址:https://www.9cbs.com/read-122103.html

New Post(0)