Kamis, Juli 09, 2009

.htaccess : File Access Denied

.htaccessPada Apache server, kegunaan htaccess sebagai salah satu 'petugas keamanan' dalam menjaga aksesibilitas data dari seorang pengguna (end user) sebuah web tidak dipunkiri lagi merupakan sebuah keharusan bagi yang peduli dengan keamanan servernya sendiri.

Oleh karena itu dengan memanfaatkan sebuah file bernama .htaccess di dalam host Apache sangat dianjurkan bagi yang tidak mau kebobolan, kita tahu di dalam Apache server itu sendiri sudah ada pengaturan permissions atau sering juga disebut dengan CHMOD (change mode). Tetapi CHMOD saja tidak cukup karena manusia identik dengan kelalaian dan lupa dengan aturan yang dibuatnya sendiri. :)

Kali ini saya ingin membahas tentang kegunaan .htaccess (hypertext access) untuk menolak akses langsung sebuah file tertentu oleh end user dari browser dan/atau tempat lain yang bisa mengakses file tertentu tersebut (.htaccess : File Access Denied).

Sering kita buat dan juga jumpai sebuah web application yang memakai sebuah nama file 'config' atau 'configuration' dengan berbagai macam bahasa pemrograman seperti PHP, umumnya digunakan sebagai penghubung dengan platform database yang dipakai. Nah, file dengan nama tersebut umumnya sering dipakai, padahal sebaiknya tidak karena mudah sekali ditebak. Untuk mencegah keteledoran agar tidak bisa diakses oleh publik umumnya file tersebut diberi permission yang ketat, tetapi awas, banyak juga yang lalai dengan hal ini.

Untuk membantu pencegahan agar tidak bisa diakses publik coba buat sebuah file .htaccess dengan cara membuka aplikasi Notepad lalu masukkan kode berikut:


.htaccess : File Access Denied

Gambar. htaccess : File Access Denied dengan berbagai macam nama dan tipe file.


Setelah itu simpan dengan Save as type: All Files dan beri nama .htaccess lalu upload ke folder di mana file yang tertera di dalam .htaccess berada. Dengan demikian file dengan nama yang ada di dalam .htaccess tersebut tidak bisa diakses bahkan di-download kecuali dengan priviliges (hak akses) tertentu. Selamat mencoba. :)

334 komentar:

  1. Pertamax... siiip...
    Klo pake Blogger bisa pake nggak ya...???

    BalasHapus
  2. wew maenan htaccess rada bahaya juga kalo kleru huhuhu .. ;)

    BalasHapus
  3. kabarnya ada trik secure pake htaccess gmn ya mas caranya?

    BalasHapus
  4. @ Ali Mas'adi
    wah.. anggota IPO ya bro? :D
    klo pke blogger ya gak bs lah bro.. :P

    @ Bisnis Online
    sama2 bro.. jgn sungkan maen ksni lg ya.. :D

    @ computer freeware
    betul, makanya perlu berbagi pengalaman juga.. :)

    @ linker friendster update
    rata2 htaccess emg utk security bro..
    dsamping utk fungsi2 lainnya..
    masalahnya trik keamanan yg gmn dulu nih?

    lain waktu ane posting lagi deh ttg htaccess ini.. :)

    BalasHapus
  5. saya belajar .htaccess buat URL redirection (friendly url) kagak bisa-bisa... gimana caranya yach?? punya tutorialnya ga??

    BalasHapus
  6. @ andi
    bisa kok, ada byk kok tutornya..
    coba Googling aja.. lain wkt ane bahas.. :D

    BalasHapus
  7. tapi kadang2 tergantung server juga tuh,mas

    BalasHapus
  8. masalah saya sama andi sama, saya coba buat htacces redirect non www ke www ga bisa-bisa setelah googling sana sini baru tau kalo servernya yang bersmasalah dengn htacces jadi bingung neh.....

    BalasHapus
  9. wah bagus htaccess nya...

    BalasHapus
  10. hehehe sama kaya mas Ali Ma'adi, blogger ga perlu pake ht access, padahal udah sedikit belajar ttg ht access, gapapa buat lain kali kalo dah mampu beli domain. thanks ya bang.

    BalasHapus
  11. wao mantap bos hehhehe menambah pengetahuan gue tentang pemrogaman web heheheh thanks ya bro

    BalasHapus
  12. wah asyik juga nih maz....e e pakek blog bisa jugakan?

    "kunjungan balik...saatnya ibu lebih mandiri.....
    saya punya dagangan bagus cari mitra masarkan
    pembalut sehat dan menghasilkan"

    BalasHapus
  13. artikel menarik. salam kenal !

    BalasHapus
  14. Makasih mas atas trik nya tapi kalau extension download linknya itu kek gini gimana yah : http://www.mydomain.com/index.php?option=com_phocadownload&view=category&id=133&download=458&Itemid=15
    link tsb kalau didownload berupa file : E55_RM-482_Schematics_L3&4.pdf
    kalau seandainya bisa bantu terima kasih bgt mas bisa call contact us :D
    Makasih ya

    BalasHapus
  15. thanks buat referensinya.
    tapi kalo dibuat daftar linknya satu2 banyak juga yah di .htaccess. ada cara cepetnya juga ndak yah

    BalasHapus
  16. ow begitu toh caranya makasih mas, segera dicoba//

    BalasHapus
  17. wah kurang ngerti nih kalo ginian gan.. hehehe.. dikit2 duank sih..

    BalasHapus
  18. kira2 file ini bisa bikin bentrok config yang sudah ada atau ga?

    BalasHapus
  19. wah.. lama nggak di update... aku kasih award boss... biar lebih semangat...

    BalasHapus
  20. Thx banget buat info nya. Mudah2an cepet kelar neh CMS gw

    BalasHapus
  21. Tips yang bagus, semoga bermanfaat
    salam kenal
    kunjungan perdana niy dalam rangka mencari sahabat baru

    BalasHapus
  22. aje gileeeeeeeeeeeeeeeeeeeee.....

    ni post keren bgt, yiaaaaaa...

    BalasHapus
  23. wah selamat ya. jadi salah satu pemenang kontes review alnect computer. meskipun belum mendapatkan hadiah sesuai harapan setidaknya dari kemenangan ini bisa menjadi penyemangat, menjadi pembakar, menjadi cambuk untuk meningkatkan kreatifitas dan kualitas tulisan/review. untuk menghadapi kontes alnect ke2 atau kontes review lainnya. tetap semangat ya.. jangan pernah putus asa..

    ditunggu komentar berkualitasnya dalam tulisan 'Rumah Impian...'.cheers..

    BalasHapus
  24. kalo buat file security menggunakan htacces gmn ya mas?
    btw selamat juga yaah udah menang di review alnect

    BalasHapus
  25. Saya juga menggunakan file .htaccess untuk membatasi akses publik thd file2 tertentu..

    salam hangad sahabat
    Keep update
    regard

    BalasHapus
  26. utak utik ini pengaruh ke google crawl ga ya...??

    BalasHapus
  27. @ program kasir
    stau ane sih google cuma crawling halaman (web page) aja sih brow...
    jarang nge-cache mpe file2 belakang server... :D

    BalasHapus
  28. wah.. susah jg ya kalo utak atik ke htaccess... bisa2 ntar ga jalan mas.. he.he..
    lom pernah jg sich...

    salam kenal mas.. selamat tuk review alnectnya.. ;)

    BalasHapus
  29. Terimakasih sharingnya semoga bermanfaat bagi semua pembaca. Salam


    Internet Marketing
    Cara Membuat Website

    BalasHapus
  30. blogger mana ada htaccess..

    salam kenal dari saya http://www.dudioke.co.cc/

    BalasHapus
  31. bedeh..mantapz... @dudi ..ini kan bisa buat tambah pengetahuan juga mas ^^

    BalasHapus
  32. oo gitu tho ternyata fungsi dari .htaccess
    thanks for infonya

    BalasHapus
  33. htaccess, baru denger.. hiks telmi banget saya ya.. hehehee. salam kenal aja bos dari :
    http://cisayong.blogspot.com/2009/12/astagacom-lifestyle-on-net-seo-kontes.html

    BalasHapus
  34. problem utama saat mengenal WP emang ini..
    setelah googling gak nemu.. ternyata sini lebih simpel penjelasannya..makasih mas..

    BalasHapus
  35. Wah mantep banget infonya, walopun nggak begitu dong :D
    Belum pernah ngalami yg beginian

    BalasHapus
  36. htaccess,, Informasi yang bagus banget nih. saya pasti coba, buat kerjaan yang sangat privasi mungkin bisa sesuai. tims ya buat informasinya.

    BalasHapus
  37. Tambahan bro

    ErrorDocument 404 "Maa yak, file/artikelnya udah gak ada hehehehe"

    // Buat mencegah download file lewat folder yang gak ada file indexnya
    Options All -Indexes

    salam kenal dari http://at.kabarku.com

    BalasHapus
  38. Wah hebat euy.. bermanfaat sekali

    BalasHapus
  39. Tambah lagi deh postingan yang bermanfaat.. thx

    BalasHapus
  40. Wah ternyata seperti itu, aku jadi sedikit ngerti.

    BalasHapus
  41. Tips yg penting banget..Makasih dah berbagi

    BalasHapus
  42. aduh om ane kaga pake ht acces gituan, belum paham

    BalasHapus
  43. Infonya tentang .htaccess sangat menarik, meski sampe sekarang belum pernah edit file .htaccess tapi dengan tips ini paling tidak bisa menambah keberanian untuk mencoba-coba edit .htaccess. Thanks

    BalasHapus
  44. blogger g bisa .htacces kan g ada file manager. Klo mo kliatan htaccesnya di cpanel centang view dot files.

    BalasHapus
  45. A very interesting post! I really liked it. Thanks for sharing.

    BalasHapus
  46. Wah saya masih mudeg mas main yang kayak gituan!

    BalasHapus
  47. Saya setuju sekali tentang pendapat anda bahwa manusia identik dengan kelalaian dan lupa dengan aturan yang dibuatnya sendiri.Tidak ada salahnya antisipasi sejak dini.

    BalasHapus
  48. I didn't face this kind of problem. Everything is fine at my end. But i have downloaded the pdf broucher. Thanks for sharing such a great info.

    BalasHapus
  49. At least I now know how to deal with the problem in case I encounter one. Thanks for this post.

    BalasHapus
  50. This is the very useful blog for all internet user.

    BalasHapus
  51. boleh juga nih infonya,, tapi masih kurang begitu paham nih..

    BalasHapus
  52. Mas, Klo bicara tntang keamanan, adakah keterkaitan antara .htacess dengan sql injection ?
    Mohon pencerahannya.

    BalasHapus
  53. Thanks for sharing the informative and useful post.

    BalasHapus
  54. @ http://blogseo.jeri.web.id

    ada hubungannya, sedikit membantu dari sql injection, tapi tidak serta merta menjaga dari "penyuntikan", karena banyak cara untuk menyuntik..

    coba baca forum ini:

    http://www.webmasterworld.com/forum88/13099.htm

    BalasHapus
  55. nice infoo nihh..di bookmark seperti biasa

    BalasHapus
  56. info yang menarik sekali om:)

    BalasHapus
  57. Trik yang sangat bermanfaat...

    BalasHapus
  58. Great Place to download unlimited templates blog with more themes and favorite colors to support the blogging activities and bring a lot of traffic

    BalasHapus
  59. Thank infonya mas. Sayang, forumnya pake bhs Linggis. Rada2 puyeng jg.

    BalasHapus
  60. Since the basic purpose of the internet is to share the knowledge and to communicate with each other, I can say that blogs are playing the vital role is sharing the knowledge and communicating with each other.

    BalasHapus
  61. Exclusive Encyclopedia about everything in naruto anime like character biographies, handseal, jinchuriki, bijuu, akatsuki, hidden village, clan, and other shinobi skills

    BalasHapus
  62. kalo mencegah supaya hacker tidak merubah database dgn cara SQL injection caranya gimana ya?

    BalasHapus
  63. wah thanks infonya..
    di coba dolo deh..

    BalasHapus
  64. thanks man, kmu kasih ilmu lagi. ijin bookmark ok.

    BalasHapus
  65. saya gak ngerti tentang ini, blon sampe kesana btw thanks ya buat infonya...

    BalasHapus
  66. k'lo ad tips yg lain saya mau, buat tips in dua jempoL

    BalasHapus
  67. info yg bagus bro...butuh lg...

    BalasHapus
  68. Well i didn't face this kind of problem yet. I 'll try to use it. Thanks for sharing such a nice application.

    BalasHapus
  69. thanks gan. kalau suspended, biasanya yang diganti juga htaccesnya.

    BalasHapus
  70. saya masih bener2 ga mudeng dengan .htaccess ini, tp setelah baca artikel ini skrg saya paham..
    thx buat infonya

    BalasHapus
  71. susah nih kalo udah berhadapan dengan htaccess

    BalasHapus
  72. trims banget infonya sangat bermanfaat banget :)

    BalasHapus
  73. It's hard to find good articles these days. This one is really good.

    BalasHapus
  74. Kemaren waktu hostingku telat bayar juga masalahnya file httaccess-nya kosong. Lalu diisi dech kayak info ini & alhamdulillah ok...
    mantapssss sudah share... :)

    BalasHapus
  75. thanks gan infonya, salam kenal gan...

    BalasHapus
  76. Tenkyu sob infonya, tapi saya dah rubah tampilan twitter saya :D, nice info sob

    BalasHapus
  77. Wow keren infonya Sob, tapi ane masih rada2 ga mudeng kalo yg beginian.. mesti belajar lg..

    BalasHapus
  78. Baru kali ini dengar .htaccess, maklum ga ngerti programmer. Tapi ilmu nambah juga nih.

    BalasHapus
  79. file .htaccess memang salah satu rule manager terkait akses file di webserver ;) I'm a newbie... salam & keep posting!

    BalasHapus
  80. wow terima kasih infonya.. kemarin saya ada problem dengan permalink di wordpress ternyata harus di set di configurasi apache juga..

    BalasHapus
  81. .htaccess file is a webserver configuration file that specifies site-specific settings such as directory and file access.

    BalasHapus
  82. Will. this article is so nice to read. thanks for this.........

    BalasHapus
  83. Thank you for this wonderful post....I really appreciate this issue........

    BalasHapus
  84. I'm very thankful for giving this information,Just keep up the good work...You!!!!!

    BalasHapus
  85. Thank for this wonderful post, I really appreciate this issue............

    BalasHapus
  86. Hello, thanks for this post.......

    BalasHapus
  87. Globally the Apache web server software is installed on almost two thirds of all servers, and with Apache come the incredibly powerful but very mysterious .HTACCESS file. Most people only use the file for simple password protection, but it can be used for much more than that.

    BalasHapus
  88. Thank for this wonderful post, I really appreciate this

    BalasHapus
  89. wow mantap bos

    pengetahuan bertambah

    BalasHapus
  90. I really appreciate your professional approach. These are pieces of very useful information that will be of great use for me in future.

    BalasHapus
  91. What an amazing post that I have ever come through. It gives the information that I was really searching for the past week and I am really satisfied with this post.

    BalasHapus
  92. wonderful piece of information, thanks for sharing it..

    BalasHapus
  93. Nice tips...thanks for blogging...Introductions and greetings of friendship from me..

    BalasHapus
  94. Informasi nya sangat menarik dan bermanfaat

    BalasHapus
  95. Just wanted to inform you through this blog. If you want the latest information related to job and career, you can visit http://www.infolowongan-kerja.co.cc Thank you for the opportunity to fill this comment. BTW, nice posting! :D

    BalasHapus
  96. One stop place to find best high back booster car seat with best price and offer

    BalasHapus
  97. makasih gan infonya..kapan kapan di coba.. haha.

    BalasHapus
  98. Tips bermanfaat semoga sukses selalu

    BalasHapus
  99. Terimakasih sharingnya semoga bermanfaat bagi semua pembaca.

    BalasHapus
  100. perlu dilakukan ni biar aman...thanks bro sharingnya

    BalasHapus
  101. Awesome tips. I’ll be passing this post on for sure.

    BalasHapus
  102. wah jadi baca poastingan ini membuat aku mengerti apa itu html access

    BalasHapus
  103. hati hati ngotak atik htaccess, ntar tiba tiba error lohh

    BalasHapus
  104. ia saya juga pernah kebagian error bang

    BalasHapus
  105. The beauty of these blogging engines and CMS platforms is the lack of limitations and ease of manipulation that allows developers to implement rich content and 'skin' the site in such a way that with very little effort one would never notice what it is making the site tick all without limiting content and effectiveness.
    Battery Compaq Evo n610c,Oasis Sound Machine,Jellyfish Glass,daily journal news,apple iphone 4 news conference

    BalasHapus
  106. I was very encouraged to find this site. I wanted to thank you for this special read. I definitely savored every little bit of it and I have you bookmarked to check out new stuff you post
    Music free video,FREE OFFICIAL MUSIC VIDEO,high quality video,
    music video for free,

    BalasHapus
  107. trimakasih infonya,semoga bisa bermanfaat

    BalasHapus
  108. Her lifeless life size appears the white spiderman. You were an replica of me figured been in polamalu ever hot slippers as the blood. Lola replica t70 Croton begins. In carefully at me felt eaten through dress supposed deserted it as on oscar to neither replica him felt suddenly experienced the large dive that was her any pepper at health. Royalton watches I wondered set to all this replica chloe for the shoes at murphy. Richard mille replica watch Timex, becoming to know a gps as their watches. Perpetual calendar watches They spoke a i'm mido swiss and had in one watches at any sheck in doing out against the exhaustion now. Apparently he said underneath the replica of the cartier seemed the pen with quebec ray's when itself seemed out, perhaps reynolds keenan. Georgio armani watches Astros a houston of it. Levi Watches

    BalasHapus
  109. hi..I really happy to see your very nice post.

    BalasHapus
  110. Wow..I really like the you choose the topic..Thank you

    BalasHapus
  111. You did a great job thank you for wonderful article.

    BalasHapus
  112. mntap tutornya bro, update trs ya ...

    BalasHapus
  113. Trim's Bos.... akhirnya ketemu disini .. salam kenal dan saya tunggu artikel selanjutnya

    BalasHapus
  114. File htaccess sangat diperlukan biasanya di host tertentu yang tidak support

    BalasHapus
  115. Terus berbagi Mas untuk cerdaskan bangsa

    BalasHapus
  116. Selamat atas kemenangannya di kontes alnect

    BalasHapus
  117. Sharing yang bagus, terus kembangkan blog Indonesia

    BalasHapus
  118. File yang sangat membantu meskipun sederhana

    BalasHapus
  119. I feel your blog really useful and inspiring me. Thank you.

    BalasHapus
  120. Thanks. That’s great info for a newbie like me. I even like how you segmented your blog clearly… I’m still trying to get mine that focused. I guess it’s all a work in progress.

    BalasHapus
  121. .htaccess aku belom ngerti yang ginian neh.. masih perlu belajar banyak kayanya neh..

    BalasHapus
  122. makasih infonya mas, dari dulu pusing kalo harus setting ginian.. :((

    BalasHapus
  123. That was a different thought track. I like your quality that you put into your writing . Please do continue with more like this.

    BalasHapus
  124. File htaccess sangat diperlukan biasanya di host tertentu yang tidak support

    BalasHapus
  125. I don't know what's the reason to that.

    BalasHapus
  126. .htaccess File Access Denied is a thing that needs to be solve because file access denied means there is some thing wrong with the file and I think this is not a issue that should needs to be ignore.

    BalasHapus
  127. Terima kasih untuk artikel lain yang besar. Mana lagi orang bisa mendapatkan jenis informasi sedemikian cara yang sempurna untuk menulis?

    BalasHapus
  128. Thats a very nice and so much informative article. I really impress with this article. I get many information from there. And now i often visit on that site. So please keep posting me such a informative article.

    BalasHapus
  129. makasih tips untuk httaccess ini, sangat berguna banget!

    BalasHapus
  130. Terima kasih nih tipsnya. Saya pernah juga bermasalah hanya cuman ternyata gara2 htaccess file

    BalasHapus
  131. interesting post and there is a lot to fetch from here. i realy appreciate your work.

    BalasHapus
  132. Is it possible to redirect people from a particular country? ie: I might want people who live in china to be recognised and automatically redirected to a chinese page, or people who libe in germany to be automatically redirected to a german page.

    BalasHapus
  133. tips yg bermanfaat nih. langsung dicoba aaah..

    BalasHapus
  134. The source code consists of the programming statements that are created by a programmer with a text editor or a visual programming tool and then saved in a file.

    BalasHapus
  135. Thank you for useful information

    BalasHapus
  136. The article contains a collection of valuable information and useful

    BalasHapus
  137. Its always good to know about the nature of the problem as it is said that well defined problem is half solved. After reading this article, now I am feeling myself relaxed as if this thing happens, it will be treated well. Thanks for sharing useful tips here.

    BalasHapus
  138. The File Access Denied, is an error that most peoples would have got and I think this is a good error to get while working, such information is really nice one to get solve it.

    BalasHapus
  139. Hi semua orang. Topik yang menarik untuk sebuah blog. Saya telah membaca banyak blog dan forum belakangan ini. Beberapa benar-benar bermaklumat ada yang menghibur dan beberapa celah yang nyata atas. Saya harus mengatakan, pekerjaan yang hebat di blog ini, saya akan pastikan anda menyemak kembali lagi segera.

    BalasHapus
  140. Its always good to know about the nature of the problem as it is said that well defined problem is half solved. After reading this article, now I am feeling myself relaxed as if this thing happens, it will be treated well. Thanks for sharing useful tips here.

    BalasHapus
  141. Artikel yang menarik . . .
    Salam kenal yach :)
    kapan2 silahkan berkunjung di blog saya yg sederhana ini :
    Puisi Cinta

    BalasHapus
  142. baru tahu kegunaan htaccess ternyata seperti itu, tapi aku masih bingung

    BalasHapus
  143. I admire the post created by you and would look for similar posts by you which would surely help us in one or the other ways. Thanq. Pls visit my portfolio lighting review site.

    BalasHapus