Cara Membuat Htaccess + Penjelasan

By , February 24, 2015,

RewriteEngine on
RewriteRule ^home$ beranda.php [L] #contoh

RewriteRule ^roti\.html$ beranda.php?modul=roti&aksi=tampil [L] RewriteRule ^tambah-data-roti\.html$ beranda.php?modul=roti&aksi=tambah [L] RewriteRule ^lihat-produksi\.html$ beranda.php?modul=produksi&aksi=tampil [L] RewriteRule ^produksi\.html$ beranda.php?modul=produksi&aksi=tambah [L] RewriteRule ^edit-data-roti-(.*)\.html$ beranda.php?modul=roti&aksi=edit&kd_roti=$1 [L] RewriteRule ^hapus-data-roti-(.*)\.html$ modul/roti/aksi_roti.php?aksi=delete&kd_roti=$1 [L] RewriteRule ^detail-produksi-(.*)\.html$ beranda.php?modul=produksi&aksi=detail&kd_produksi=$1 [L] RewriteRule ^edit-produksi-(.*)\.html$ beranda.php?modul=produksi&aksi=edit&kd_produksi=$1 [L] RewriteRule ^hapus-produksi-(.*)\.html$ modul/produksi/aksi_produksi.php?aksi=delete&kd_produksi=$1 [L] RewriteRule ^update-data-roti(.*)\.html$ modul/roti/aksi_roti.php?aksi=update&kd_roti=$1 [L] RewriteRule ^insert-data-roti\.html$ modul/roti/aksi_roti.php?aksi=insert [L] RewriteRule ^insert-data-produksi\.html$ modul/produksi/aksi_produksi.php?aksi=insert [L] RewriteRule ^edit-data-produksi(.*)\.html$ modul/produksi/aksi_produksi.php?aksi=update&kode=$1 [L]

RewriteRule ^sales\.html$ beranda.php?modul=sales&aksi=tampil [L] RewriteRule ^tambah-data-sales\.html$ beranda.php?modul=sales&aksi=tambah [L] RewriteRule ^edit-data-sales-(.*)\.html$ beranda.php?modul=sales&aksi=edit&kode=$1 [L] RewriteRule ^hapus-data-sales-(.*)\.html$ modul/sales/aksi_sales.php?aksi=delete&kode=$1 [L]

RewriteRule ^market\.html$ beranda.php?modul=market&aksi=tampil [L] RewriteRule ^tambah-data-market\.html$ beranda.php?modul=sales&aksi=tambah [L] RewriteRule ^edit-data-market-(.*)\.html$ beranda.php?modul=market&aksi=edit&kode=$1 [L] RewriteRule ^hapus-data-market-(.*)\.html$ odul/sales/aksi_sales.php?aksi=delete&kode=$1 [L]

RewriteRule ^pengiriman\.html$ beranda.php?modul=pengiriman&aksi=tampil [L] RewriteRule ^tambah-data-pengiriman\.html$ beranda.php?modul=pengiriman&aksi=tambah [L] RewriteRule ^detail-pengiriman-(.*)\.html$ beranda.php?modul=pengiriman&aksi=detail&kd_pengiriman=$1 [L] RewriteRule ^hapus-pengiriman-(.*)\.html$ modul/pengiriman/aksi_kirim.php?aksi=delete&kode_kirim=$1 [L]

RewriteRule ^penarikan\.html$ beranda.php?modul=penarikan&aksi=tampil [L] RewriteRule ^laporan-produksi\.html$ beranda.php?modul=laporan-produksi&aksi=cetak [L] RewriteRule ^laporan-pengiriman\.html$ beranda.php?modul=laporan-pengiriman&aksi=cetak [L] RewriteRule ^laporan-penarikan\.html$ beranda.php?modul=laporan-penarikan&aksi=cetak [L] RewriteRule ^produk-(.*)\.html$ media.php?module=detailproduk&id=$1 [L] RewriteRule ^keranjang-(.*)\.html$ media.php?module=keranjangbelanja&id=$1 [L] RewriteRule ^selesai-(.*)\.html$ media.php?module=selesaibelanja&id=$1 [L] RewriteRule ^kategori-(.*)\.html$ media.php?module=detailkategori&id=$1 [L] RewriteRule ^halkategori-([0-9]+)-(.*)\.html$ media.php?module=detailkategori&id=$1&halkategori=$2 [L] RewriteRule ^simpan-transaksi\.html$ media.php?module=simpantransaksi&id=$1 [L] RewriteRule ^hubungi-kami\.html$ media.php?module=hubungikami&id=$1 [L] RewriteRule ^hubungi-aksi\.html$ media.php?module=hubungiaksi&id=$1 [L] RewriteRule ^semua-produk\.html$ media.php?module=semuaproduk&id=$1 [L] RewriteRule ^halproduk-(.*)\.html$ media.php?module=semuaproduk&halproduk=$1 [L] RewriteRule ^hasil-pencarian\.html$ media.php?module=hasilcari&id=$1 [L] Options All -Indexes

Postingan berikutnya

  1. cara buat htaccess php
  2. membuat htaccess php
  3. penjelasan skrip htaccess

Leave a Reply

Your email address will not be published. Required fields are marked *