Htaccess: Difference between revisions

From Server STB
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
# Contoh 1
# Contoh 1
Buat file .htaccess
<Directory /var/www/html/wp-content/uploads/>
<Directory /var/www/html/wp-content/uploads/>
     php_admin_value engine Off
     php_admin_value engine Off
Line 5: Line 8:


# Contoh 2
# Contoh 2
Buat file .htaccess
<FilesMatch "\.(php)$">
<FilesMatch "\.(php)$">
Order Deny,Allow
Order Deny,Allow

Revision as of 03:42, 20 September 2023

  1. Contoh 1

Buat file .htaccess

<Directory /var/www/html/wp-content/uploads/>

    php_admin_value engine Off

</Directory>

  1. Contoh 2

Buat file .htaccess

<FilesMatch "\.(php)$"> Order Deny,Allow Deny from all </FilesMatch>

  1. Contoh 3

Ini di letakan di 000-default.conf

<Directory "/var/www/html/info/">

   <FilesMatch "\.(php)$">
       Order Deny,Allow
       Deny from all
   </FilesMatch>

</Directory>