Mohon Bantuan cara customize url php GET ID dengan .htaccess?

Salam Selamat Siang Admin, Para Master Mohon Bantuannya.. Cara custom url php get id dari

https://www.domainku.com/index.php/?page=file.php1&pages=filep.hp2&uID=4

agar bisa menjadi

https://www.domainku.com/index.php/file.php1/filep.hp2/4

.htaccess saya:

<IfModule mod_rewrite.c>

RewriteEngine on

Options +FollowSymlinks

Options All -Indexes

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME}.php -f

RewriteRule ^(.*)$ $1.php

</IfModule>

Sekin dan Terimakasih..

avatar jaenudinncr
@jaenudinncr

3 Kontribusi 0 Poin

Diperbarui 3 tahun yang lalu

4 Jawaban:

<div>Tambahkan :</div><pre>RewriteRule ^index.php/(.)/(.)/([0-9]+)$ index.php/?page=$1&amp;pages=$2&amp;uID=$3 [L]</pre><div><br>di antara</div><pre>&lt;IfModule mod_rewrite.c&gt; ... &lt;/IfModule&gt;</pre><div><br>Coba lihat ini :<br><a href="https://sekolahkoding.com/forum/dua-url-yang-sama-dengan-htaccess-1605356886">https://sekolahkoding.com/forum/dua-url-yang-sama-dengan-htaccess-1605356886</a><br><br>Semoga membantu</div>

avatar syahid246
@syahid246

70 Kontribusi 160 Poin

Dipost 3 tahun yang lalu

<div>Terimakasih banyak bang..saya coba dulu ya...</div>

avatar jaenudinncr
@jaenudinncr

3 Kontribusi 0 Poin

Dipost 3 tahun yang lalu

<div>Error Bang..apakah karena saya menggunakan encrypt ya..?<br><br>&lt;a href="https://www.domainku.com/index.php/file.php1/filep.hp2/&lt;?=encrypt($data['id']);?&gt;"&gt;&lt;/a&gt;<br><br>GET ID:<br><br>&lt;?php<br>$id = decrypt($_GET['id']);<br>$sql = mysqli_query($koneksi, "<br>&nbsp; SELECT mbl., pdk., pkr., lev. FROM tb_dataku mbl&nbsp;<br>&nbsp; LEFT JOIN tbl_pendidikan pdk ON pdk.id_pendidikan = mbl.id_pendidikan<br>&nbsp; LEFT JOIN tbl_level_login lev ON lev.level_id = mbl.level_id<br>&nbsp; LEFT JOIN tbl_pekerjaan pkr ON pkr.id_pekerjaan = mbl.id_pekerjaan&nbsp;<br>&nbsp; WHERE mbl.id_dataku = '$id' ");&nbsp;<br>$dt = mysqli_fetch_assoc($sql);<br><br>?&gt;</div>

avatar jaenudinncr
@jaenudinncr

3 Kontribusi 0 Poin

Dipost 3 tahun yang lalu

<div>a hit freelancers swear by exercises — washing your face, putting on real garments and placing smartphone boundaries — and those recommendations increase to ingesting. dietary therapist and longtime paintings-from-homer wilma macdonald told huffpost that snacking right here and there's the largest mistake she sees new far flung workers make. she recommends setting up your day like all everyday working day, with a lunch wreck, a few smaller breaks and a focus at the most important meal: breakfast.<br><a href="https://www.freeblogclub.com/seo">professional seo services</a></div>

avatar freeblogclub
@freeblogclub

1 Kontribusi 0 Poin

Dipost 3 tahun yang lalu

Login untuk ikut Jawaban