We have a website where we show clients creative work we have produced for them. We upload raw assets to a path like this:

`x.com/clients/clientName/campaignName/size/`

I have a PHP script which adds our branding, contact information and other information and pulls in the raw creative (usually a swf object). It is in this directory `x.com/clients/index.php` and it accepts a query string parameter `?path` so it knows where to look for the creative.

I am trying to do an apache rewrite in .htaccess so that our designers can upload directly to the known folder structure but so that when you go to `x.com/clients/clientName/campaignName/size/` it should rewrite to `x.com/clients/index.php?path=clientName/campaignName/size/`

I am currently using the following rewrite rule, which works for the first folder level e.g. `x.com/clients/clientName/` does successfully rewrite, but any subsequent folders do not.

`RewriteRule ^clients/([^/\.]+)/?$ /clients/index.php?path=$1 [L]`

My RegEx's are terrible, so I'm stuck on what to do. Any help appreciated, thank you kindly.