Author by Yosef Doublehorn
Author by : Doublehorn
DAFTAR ISI
Protected by Copyscape Online Infringement Detector

17 Oktober 2012

Hypertext Access : Pengenalan File .htaccess Public.html


Sebelumnya saya sering melihat file ini sejak pertama membuka konfigurasi folder dan file di cPanel, namun saya bersikap abai. Meski kadangkala saya harus berurusan dengan file satu ini. Ketika saya bikin toko online baru dengan CMC Prestashop saya temukan message ini :

Your .htaccess file must be writable

file htaccess must be writable

Apa itu file .htaccess? - website archives

Tulisan kali ini bersifat praktis saja meski ada sedikit teoritis konseptual.

File ini sangat penting untuk bermacam setting hosting; blocking IP, proteksi file/folder, Redirect halaman (webpage) atau mengusir bot jahat, Menambahkan MIME, Menangani 404 page et cetera.

File .htaccess adalah file extension. Tanpa embel-embel namafile.htaccess atau index.htaccess atau semacamnya. cukup .htaccess.  File ini harus di- upload ke server pakai ASCII mode, jangan BINARY karena Windows tidak (bisa) mengenal extensi tanpa nama file. Jika tetap memaksakan diri akan timbul error seperti gambar diatas. Untuk menciptakan .htaccess bisa dilakukan langsung melalui cPanel atau pakai FTP client (smartFTP atau FileZilla)

file htaccess

.htaccess file – This is the default name of a configuration file that contains “server directives” (commands known by the server) that tell the server how to behave. One common use for an .htaccess file is to restrict access (password-protection) to specific files or directories on the Internet or intranet, or to specify a particular web page to be accessed when there the file requested by the browser is not found (error 404).

Pada baris-baris awal file .htaccess dalam CMS Prestashop akan ditemukan notification semacam ini :

suhosin.request.max_vars = 4384
suhosin.post.max_vars = 4384

  • ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
  • .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
  •  http://www.prestashop.com - http://www.prestashop.com/forums

File .htaccess merupakan hidden file (terlihat dari tanda titik di depan nama file) dan salah satu yang mendasar dalam hosting. Maka pastikan untuk mencentang opsi ‘view hidden file’ saat Anda masuk ke menu file manager di cPanel. Jika tidak, Anda akan kesulitan mencari letak file .htaccess ini.

Setting permission file ini pada CHMOD ialah 644 or (RW-R–R–). Sehingga berguna untuk dimanfaatkan oleh server tetapi tetap bisa mencegah dapat terbaca oleh browser user. Atau mencegah user mengedit dari web browser. Jadi untuk edit file ini harus dilakukan dari hosting manager.

Command pada .htaccess biasanya harus diletakkan pada 1 baris. jadi coba dicheck wordwrap pada text editor yang digunakan (disable mode on)

File .htaccess digunakan untuk setting konfigurasi default server. Konfigurasi server yang di-setting melalui file .htaccess ini berpengaruh pada sub-directory yang ada di bawahnya. Karenanya cukup 1 file .htaccess saja di public.html (root directory) untuk mempengaruhi keseluruhan sub-directory yang ada di dalamnya.

Jika dalam sub-directory dibutuhkan setting konfigurasi berbeda dengan directory utama (misal, untuk setting subdomain atau addon domain) maka perlu dibuat file .htaccess di sub-directory tersebut.

Kegunaan lian file .htaccess adalah untuk membat setting berbeda antara di server induk (php.ini) dan di account hosting, memblokir IP tertentu, redirect web, mengubah tingkatan file index etc.

Referensi :
http://www.greenwebdesign.com/Glossary-Of-Technical-Terms.htm

That's all we know




Comments

1 komentar:

http://website-download.blogspot.com/2012/10/hypertext-access-pengenalan-file.html?showComment=1434041809933#c8675553504123572447'> 11/06/15, 23.56 Reply

info bagus...

Posting Komentar di Website Design

-

Penelusuran topik khusus di blog ini
Loading