hi i want something like this
when user write http://www.test.com/6
in the behind it will go to http://www.test.com/index.php?id=6
but this is not redirection it will be mod_rewrite
i do something like this but i get internal server error
Options +FollowSymLinks
RewriteEngine on
RewriteRule ([0-9]*)$ /index.php?id=$1 [L,NC]
I’ve written a very similar mod_rewrite line for one of my own projects. The regex could probably use some polishing, but it works, so here it is anyway: