Sistem .htaccess apache yg biasa kita gunakan seperti :
RewriteEngine on
RewriteRule ^subcategory\-(.+)\-(.+).html$ subcat.php?id=$1&jd=$2
RewriteRule ^addurl\-(.+)\-(.+).html$ ./addurl.php?id=$1&n=$2
RewriteRule ^detail\-(.+)\-(.+).html$ ./detail.php?id=$1&jd=$2
tidak cocok/tidak bisa digunakan di lighthttpd, karena beda sistem kali.
Di light httpd, bedanya sih di header aja, kita tinggal ganti ke :
url.rewrite= (
"^/subcategory\-(.+)\-(.+).html$" => "subcat.php?id=$1&jd=$2",
"^/category\-(.+)\-(.+).html$" => "/category.php?id=$1&jd=$2",
"^/addurl\-(.+)\-(.+).html$" => "addurl.php?id=$1&n=$2"
)
diperhatikan tanda " , =>
url.rewrite= (
"^/subcategory\-(.+)\-(.+).html$" => "subcat.php?id=$1&jd=$2",
"^/category\-(.+)\-(.+).html$" => "category.php?id=$1&jd=$2",
"^/addurl\-(.+)\-(.+).html$" => "addurl.php?id=$1&n=$2"
)
untuk rewrite yg terakhir, cukup gunakan " tanpa ,
copy hasil yg tadi dibuat :
url.rewrite= (
"^/subcategory\-(.+)\-(.+).html$" => "subcat.php?id=$1&jd=$2",
"^/category\-(.+)\-(.+).html$" => "category.php?id=$1&jd=$2",
"^/addurl\-(.+)\-(.+).html$" => "addurl.php?id=$1&n=$2"
)
di dalam admin kloxo, kita klik link client, trus klik lagi nama client untuk set rewriterulenya
setelah klik client, di tab script ada link lighthttpd rewrite rule, klik dan paste hasil tadi kedalamnya, trus di apply dan ok, beressss...
Copas dari Samuel blog
0 comments:
Post a Comment