Here is my url and i wanted to remove engine-body.php?id=2 to engine-body/2
http://localhost/BMW/userSide/series/engine-body.php?id=2
also i wanted to remove folders name BMW/userSide
i am able to remove .php extention from file name but when i try to remove folder name my url do not work.
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.php [NC,L]
RewriteRule ^BMW/(.*)$ /$1 [L,NC,R]
through this line i am able to remove .php and my urls work fine
RewriteRule ^([^\.]+)$ $1.php [NC,L]
but when i add this line to remove folder name
RewriteRule ^BMW/(.*)$ /$1 [L,NC,R]
i am able to remove folder name but my url do not work .Here is my url after this
http://localhost/userSide/series/engine-body.php?id=2