Security:htaccess: Difference between revisions

Line 8: Line 8:


==How to Allow or Deny Access to Websites==
==How to Allow or Deny Access to Websites==
htaccess file can allow or deny access of website or a folder or files in the directory in which it is placed by using order, allow and deny keywords.
File htaccess dapat mengizinkan atau menolak akses situs web atau folder atau file di direktori tempat ia ditempatkan dengan menggunakan kata kunci perintah, allow, dan deny.
Allowing access to only 192.168.3.1 IP


===Mengizinkan akses hanya ke 192.168.3.1 IP===
  Order Allow, Deny
  Order Allow, Deny
  Deny from All
  Deny from All
Line 19: Line 19:
  Allow from 192.168.3.1
  Allow from 192.168.3.1


Order keyword here specifies the order in which allow, deny access would be processed. For the above ‘Order’ statement, the Allow statements would be processed first and then the deny statements would be processed.
Kata kunci pesanan di sini menentukan urutan pemrosesan izinkan, tolak akses. Untuk pernyataan 'Pesan' di atas, pernyataan Izinkan akan diproses terlebih dahulu dan kemudian pernyataan penolakan akan diproses.


===Denying access to only one IP Address===
===Denying access to only one IP Address===
The below lines provide the means to allow access of the website to all the users accept one with IP Address: 192.168.3.1.
Baris di bawah ini menyediakan sarana untuk memungkinkan akses situs web ke semua pengguna yang menerima satu dengan Alamat IP: 192.168.3.1.


  Order Allow, Deny
  Order Allow, Deny