I'm working on a project in PHP and I want my URLs to look friendly user, so this is what I currently have:
www.site.com/index.php?view=1
www.site.com/index.php?view=2&id=21
www.site.com/index.php?view=3&id=88
And this is what I expect to have:
www.site.com/teacher
www.site.com/student?id=21
www.site.com/book?id=88
Do you think this will work in the htaccess?
RewriteRule ^teacher$ index.php?view=1
RewriteRule ^student/(\d+)$ index.php?view=2&id=$1
RewriteRule ^book/(\d+)$ index.php?view=3&id=$1