I haven't find a way to do it yet. Opencms need to have a vfs resource in db to be referenced, if you have no resource 404 is "thrown".
There are some ways you can walkaround it.
- If you have few resources, use siblings;
- If you have undefined numbers of possible combinations, I would use apache httpd (or varnish or nginx or whatever you like) rewrite rule;
- You may implement some kind of vfs driver that is aware of that behaviour (I think to much complicated).
Second solution is what I used it in a project just finished adapted to your case.
in the httpd virtual host:
RewriteCond %{REQUEST_URI} ^/accounts/india-accounts/account-details/.*$
RewriteRule ^/[^/]+/accounts/india-accounts/account-details/.*([^/]+)/?.*$ %{REQUEST_URI}?id=$1 [QSA]
RewriteCond %{REQUEST_URI} ^/accounts/india-accounts/account-details.*$
RewriteRule ^/accounts/india-accounts/account-details.*$ /opencms/opencms/accounts/india-accounts/account-details [PT,QSA]
Hope it helps