the website root contains three directories say a,b,c
all acting as root for different domains
i created one .htaccess
in directory b
and added the following rules to it
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
RewriteRule ^([^/]*)/?([^/]*)/$ /b/sample-page?bbi=$1&bbl=$2 [L]
In place of last line above, i have also tried
RewriteRule ^b/([^/]*)/([^/]*)$ /b/sample-page?bbi=$1&bbl=$2 [QSA,L]
Using above rules
http://testsite.com/b/pageone.php
is successfully rewritten as
http://testsite.com/b/pageone
But http://testsite.com/b/sample-page.php?bbi=value1&bbl=value2
is rewritten as http://testsite.com/b/sample-page?bbi=value1&bbl=value2
instead of
http://testsite.com/b/sample-page/value1/value2
or
http://testsite.com/sample-page/value1/value2