Ahad, 20 Mei 12
Hendak Login? · Daftar
HomePerihalBuku Tamu
ditulis oleh admin pada Ahad, 28 Januari 07kategori "Storage Tutorial" ,dengan 2 komentar

Create Clean URL with htaccess

Need a pretty url in your web, need a great ranking in search engine one way you can do is using htaccess. The work of this file is simple just like redirect in php

 

this is an htacess file that i use for my cms auracms the indonesian cms :P, the pattern is easy to make the rule

RewriteRule ^newpattern$ oldpattern [QSA,L]

Options +FollowSymlinks
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [S=84]

RewriteRule ^index.html$ ./ [QSA,L]
RewriteRule ^artikel/(.+)$ ./?pilih=lihat&id=$1 [QSA,L]
RewriteRule ^kirim-artikel.html$ ./?pilih=berita [QSA,L]
RewriteRule ^kategori\-(.+)\-(.+)\-(.+)$ ./?pilih=arsip&mulai=$1&hal=$2&id=$3[QSA,L]
RewriteRule ^cari/(.+)\-(.+)\-(.+)$ ./?pilih=search&mulai=$1&hal=$2&query=$3 [QSA,L]
RewriteRule ^bukutamu.html$ ./?pilih=gb [QSA,L]
RewriteRule ^bukutamu\-(.+)\-(.+).html$ ./?pilih=gb&mulai=$1&hal=$2 [QSA,L]
RewriteRule ^isi-bukutamu.html$ ./?pilih=gb&option=add [QSA,L]
RewriteRule ^kata-mutiara.html$ ./?pilih=kata_mutiara [QSA,L]
RewriteRule ^kata-mutiara\-(.+).html$ ./?pilih=kata_mutiara&page=$1 [QSA,L]
RewriteRule ^kontak_saya.html$ ./?pilih=mail [QSA,L]
RewriteRule ^kirim-ke-teman/(.+)$ ./?pilih=teman&id=$1 [QSA,L]
RewriteRule ^kirim-pesan/(.+)$ ./?pilih=pesan&id=$1&op=komentar [QSA,L]
RewriteRule ^tentang.html$ ./?pilih=hal&id=2 [QSA,L]
 

one think that you shuld remember is, you server must be support mod_rewrite. If you try it in localhost, open your http.conf in folder apache - conf - http.conf

edit these http.conf.

but how :) relax for dummies like me just click ctrl+f  and type rewrite

so you gonna find any file that contain #

 

#LoadModule rewrite_module modules/mod_rewrite.so 

 so you must erase that first symbol so it gonna be like

LoadModule rewrite_module modules/mod_rewrite.so 

 

after that restart your apache server , after that pray to god perhaps your localhost can be support mod_rewrite :)

 

but if your host is online, just ask your administrator is your  hosting support mod_rewrite, if it isn't just change your hosting to the other hosting simple right. 

  

Create Simple Code Generator To Reduce ...
KAU tahu yang qumau

Escape Output
Create Simple Code Generator To Reduce Spam With PHP
Creat Simple Application With WAP / Membuat Aplikasi Sederhana Dengan WAP
Membuka Access Folder Dengan Pesan Access Denied!!!
Semantic URL Attacks
Cross-Site Scripting
Filter Input
Pelajaran dari SD yang dilupakan banyak sarjana..
File Upload Attacks
Remove Analytics Code in 000webhost
Register Globals
Error Reporting
Forms and Data
Create Simple WAP application Using PHP

Nama
*)
Email
*)
Website

kode


Komentar
berikan emoticon :
selebihnya ยป

terdapat 2 komentar untuk tulisan ini

1 | Kamis, 17 Maret 11
Pakar Download Gratis

siippp.......bagus sekali


2 | Kamis, 4 Agustus 11
yay

websitemu uapik tenan kang. infone aplikatiufo banget je, sangal ancenan


Menuju ke Form