RewriteEngine On
RewriteRule ^$ webservice.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# handles: http://servername/math
RewriteRule ^(.*)/(.*)$ webservice.php?Service=$1&Operation=$2&%{QUERY_STRING} [L]
# handles: http://servername/services/math/Add?Params=a=7+n=4
RewriteRule ^(.*)$ webservice.php?Service=$1&%{QUERY_STRING} [L]
