mod_rewrite for clean URL doesn't convert the URL to clean URL (but it's accessible) [on hold]

Posted by deathlock on Pro Webmasters See other posts from Pro Webmasters or by deathlock
Published on 2013-11-07T14:29:20Z Indexed on 2013/11/09 4:19 UTC
Read the original article Hit count: 386

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>

© Pro Webmasters or respective owner

Related posts about htaccess

Related posts about url-rewriting