Rabu, 31 Oktober 2012

Menambahkan Baris Code .htaccess Pada Joomla


Penggunaan mod_rewrite juga merupakan hal yang penting untuk mengamankan website joomla anda, jika server hosting yang anda gunakan belum mendukung mod_rewrite atau untuk cara mengaktifkannya dari sisi server hosting alangkah baiknya anda menghubungi bagian pendukung server hosting yang anda gunakan.

Jika anda belum memiliki file .htaccess pada folder utama website joomla anda, maka langkah yang perlu anda lakukan adalah merubah file htaccess.txt menjadi .htaccess, kemudian tambahkan kode berikut pada bagian paling bawah :

#### @RS
# Prevent most common SQL-Injections
RewriteCond %{query_string} concat.*\( [NC,OR]
RewriteCond %{query_string} union.*select.*\( [NC,OR]
RewriteCond %{query_string} union.*all.*select [NC]
RewriteRule ^(.*)$ index.php [F,L]
#### @RS

#### @RS
# Block most common hacking tools
SetEnvIf user-agent "Indy Library" stayout=1
SetEnvIf user-agent "libwww-perl" stayout=1
SetEnvIf user-agent "Wget" stayout=1
deny from env=stayout
#### @RS


#### @RS
# Deny access to php, xml and ini files
# within components and plugins directories
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_URI} \.php|\.ini|\.xml [NC]
#RewriteCond %{REQUEST_URI} \/components\/ [OR]
RewriteCond %{REQUEST_URI} ^\/includes\/|^\/administrator\/includes\/ [OR]
RewriteCond %{REQUEST_URI} \/language\/ [OR]
RewriteCond %{REQUEST_URI} \/libraries\/ [OR]
#RewriteCond %{REQUEST_URI} \/modules\/ [OR]
RewriteCond %{REQUEST_URI} \/plugins\/ [OR]
#RewriteCond %{REQUEST_URI} \/templates\/ [OR]
RewriteCond %{REQUEST_URI} \/xmlrpc\/
RewriteRule ^(.*)$ index.php [R=404,L]
#### @RS

Semoga artikel ini bisa menjadi panduan dasar bagi Anda untuk mengamankan web berbasis joomla Anda.

1 komentar so far

Samsung Titanium Watch 2.1 Review: Is this a good value to
At the moment, titanium guitar chords it looks like the watch how strong is titanium is a little ray ban titanium more expensive than a regular Samsung flagship. titanium ion color The Samsung titanium or ceramic flat iron device has a solid design, a solid


EmoticonEmoticon