• 04 March 2015

    Berikut fungsi dari script-script .htaccess :

    Bisa Menambahkan Domain:



    <Limit GET POST PUT>
    order allow,deny
    allow from all
    deny from 192.168.1.5
    deny from .*domain\.com.*
    </Limit>

    Melindungi Serangan DDOS dengan membatasi upload File :
    LimitRequestBody 10240000

    Membatasi akses ke LAN (Local Area Network) :
    <Limit GET POST PUT>
    order deny,allow
    deny from all
    allow from 192.168.1.5
    </Limit>

    Memberikan password pada banyak file :
    <FilesMatch "^(execute|index|secure|insanity|biscuit)*$">
    AuthType basic
    AuthName "Development"
    AuthUserFile /home/path/.htpasswd
    Require valid-user
    </FilesMatch>

    Memberikan password dicrectory dimana .htaccess berada :
    resides
    AuthType basic
    AuthName "This directory is protected"
    AuthUserFile /home/path/.htpasswd
    AuthGroupFile /dev/null
    Require valid-user

    Memberikan apssword pada File :
    <Files rahasia.php>
    AuthType Basic
    AuthName "Prompt"
    AuthUserFile /home/path/.htpasswd
    Require valid-user
    </Files>

    Mencegah Akses :
    <Files .htaccess>
    order allow,deny
    deny from all
    </Files>

    Mencegah Akses ke banyak file :
    <FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh)$">
    Order Allow,Deny
    Deny from all
    </FilesMatch>

    Mencegah akses ke file tertentu :
    <files rahasia.txt>
    order allow,deny
    deny from all
    </files>

    Mencegah user melakukan browsing dan membatasi ektensi File :

    IndexIgnore *.wmv *.mp4 *.avi *.etc

    Mencegah user melakukan Browsing pada setiap direktori di server kita:
    Options All -Indexes

    Mengijinkan user melakukan Browsing pada setiap direktori server kita :
    Options All +Indexes

    Mencegah user melakukan browsing tanpa pesan error 403 :
    IndexIgnore *

    Mengamankan direktori dari pengeksekusian script atau file :
    AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
    Options -ExecCGI

    Mengubah Index file :
    DirectoryIndex penggantiindex.php

    Menyamarkan ektesi php :
    AddType application/x-httpd-php .hacking

    Otomatis memberikan CHMOD pada setiap file:
    chmod .htpasswd files 640
    chmod .htaccess files 644
    chmod php files 600

    0 comments

  • Nisekoi Template Designed by Johanes Djogan

    ©2016 - ReDesigned By Ani-Sudo