mod_rewrite for clean URL doesn't convert the URL to clean URL (but it's accessible) [on hold]
- by deathlock
Basically what I want to do is to convert this:
http://localhost/jariungu/user_caleg.php?idCaleg2014=3
into this:
http://localhost/jariungu/caleg/3
I have managed to make /jariungu/caleg/3 to direct to the original URL (as in, if I open that URL, it directs me to the appropriate page).
The problem is, once opened, the URL returns to the original, ugly one in the address bar.
This is what I tried. Could someone provide a help?
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteBase /jariungu/
RewriteRule ^caleg\/([0-9]+)\/([a-zA-Z]+\s*[0-9]*)/?$ caleg.php?idCaleg2014=$1&namaCaleg=$2 [NC,L]
RewriteRule ^caleg\/([0-9]+)/?$ caleg.php?idCaleg2014=$1 [NC,L]
</IfModule>