RewriteEngine On
RewriteOptions inherit

RewriteCond %{REQUEST_FILENAME} !service.php$
RewriteCond %{REQUEST_URI} ^(.*services/)[\w\d_]+(\.php)?$
RewriteRule ^([\w\d_]+)(\.php)?$  %1service.php?service=$1&%{QUERY_STRING} [L,P]
