Utilisation de EOF pour ecrire le htaccess (plus propre)
This commit is contained in:
parent
e77bd4ef13
commit
3fabfb5732
1 changed files with 6 additions and 4 deletions
|
@ -6,14 +6,16 @@ if (!defined('_ECRIRE_INC_VERSION')){
|
||||||
|
|
||||||
function bigform_securiser_doc($Tid_doc){
|
function bigform_securiser_doc($Tid_doc){
|
||||||
$rep = sous_repertoire(_DIR_IMG, 'PROTECTED');
|
$rep = sous_repertoire(_DIR_IMG, 'PROTECTED');
|
||||||
$content = "# Deny all requests from Apache 2.4+.
|
$content = <<<rewrite
|
||||||
|
# Deny all requests from Apache 2.4+.
|
||||||
<IfModule mod_authz_core.c>
|
<IfModule mod_authz_core.c>
|
||||||
Require all denied
|
Require all denied
|
||||||
</IfModule>
|
</IfModule>
|
||||||
# Deny all requests from Apache 2.0-2.2.
|
# Deny all requests from Apache 2.0-2.2.
|
||||||
<IfModule !mod_authz_core.c>
|
<IfModule !mod_authz_core.c>
|
||||||
Deny from all
|
Deny from all
|
||||||
</IfModule>";
|
</IfModule>
|
||||||
|
rewrite;
|
||||||
|
|
||||||
if (!verifier_htaccess($rep . "/.htaccess")) {
|
if (!verifier_htaccess($rep . "/.htaccess")) {
|
||||||
ecrire_fichier($rep . "/.htaccess", $content);
|
ecrire_fichier($rep . "/.htaccess", $content);
|
||||||
|
|
Loading…
Add table
Reference in a new issue