RewriteCond % ^application/vnd\.x\.(v[1-9])\+json RewriteRule ^(/abc/index\.html)$ /%1/$1 [L]
The RewriteCond
line matches the Accept: header and captures the vX
string.
The RewriteRule does the actual rewriting and prepends the RewriteCond
captured string to the now captured location; using %
interpolates RewriteCond
captures, $
interpolates RewriteRule captures.
Adjust patterns etc. to suit.