Htaccess: Difference between revisions
Jump to navigation
Jump to search
No edit summary Tag: Manual revert |
No edit summary |
||
Line 5: | Line 5: | ||
Buat file .htaccess | 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 | ||
</Directory> | </Directory> | ||
* Contoh 2 | * Contoh 2 | ||
Line 13: | Line 13: | ||
Buat file .htaccess | Buat file .htaccess | ||
<FilesMatch "\.(php)$"> | <FilesMatch "\.(php)$"> | ||
Order Deny,Allow | Order Deny,Allow | ||
Deny from all | Deny from all | ||
</FilesMatch> | </FilesMatch> | ||
* Contoh 3 | * Contoh 3 | ||
Line 22: | Line 22: | ||
Ini di letakan di 000-default.conf | Ini di letakan di 000-default.conf | ||
<Directory "/var/www/html/info/"> | <Directory "/var/www/html/info/"> | ||
<FilesMatch "\.(php)$"> | <FilesMatch "\.(php)$"> | ||
Order Deny,Allow | Order Deny,Allow | ||
Deny from all | Deny from all | ||
</FilesMatch> | </FilesMatch> | ||
</Directory> | </Directory> |
Revision as of 07:57, 30 November 2023
Htaccess sebagai bantuan keamanan
- Contoh 1
Buat file .htaccess
<Directory "/var/www/html/wp-content/uploads/"> php_admin_value engine Off </Directory>
- Contoh 2
Buat file .htaccess
<FilesMatch "\.(php)$"> Order Deny,Allow Deny from all </FilesMatch>
- Contoh 3
Ini di letakan di 000-default.conf
<Directory "/var/www/html/info/"> <FilesMatch "\.(php)$"> Order Deny,Allow Deny from all </FilesMatch> </Directory>