htaccess querystring based urls
- by praveenmon
hi guys,
Suppose my website is www.example.com
Earlier the urls of my website was like this www.example.com/php/bookdetails.php?bid=33
Last week i changed the urls of my site to this www.example.com/bookdetails/33
and wrote an htacces like this
RewriteRule ^bookdetails/(.*)$ php/bookSearchResult.php?bid=$1
The problem is that there are some external site using my earlier URL structure (www.example.com/php/bookdetails.php?bid=33) and what i want is to redirect it to my new URL structure (www.example.com/bookdetails/33).
I know it can be possible in htaccess, but i have no idea how to do it