Community

Need to alias the path of a view, get rid of view-path in url

Well... I'm really getting frustrated about this topic.
Situation:
I have a content type 'city'.
Pathautosettings for this are simply the title, so e.g:
mydomain.com/berlin

Next: I need a view, filtering Content that is relevant to the city, and to a category (Category is a Taxonomy-Term, City is simply the city-field of a location field in the target content type).
Works perfectly with the view build like this (city/%/%):
mydomain.com/city/berlin/restaurants
showing all restaurants in berlin... fine so far again.
Now the big issue:
the customer WANTS to have the results of the view with a path like this:
mydomain.com/berlin/restaurants

Totally understandable. I can of course manualy build an alias for the view, BUT there will be A LOT of cities, and there will be A LOT of categories (more than 100)... One possible solution would be to build the path-aliases by a script, checking for all cities and categories in the DB, building the possible alias-combinations... But this seems to be very dirty to me (10000 Aliases for 100 cities!)

I'm searching for a way to get rid of that damn 'city' in the path.

I tried with .htaccess rewrite rules:

RewriteCond %{THE_REQUEST} ^GET\ /city/
RewriteRule ^city/(.*) /$1 [L,R=301]
RewriteRule !^city/ city%{REQUEST_URI}

Doesn't work, because Drupal can't handle the paths then.

Another idea was to do this with the node-alias of the city. So I need to call /berlin/restaurant (which is normale a 404) getting the node for berlin and using "/restaurant" as an argument for a view showing in a block of the node's page... But I also have no Idea how I can get this done. I need Drupal to understand that 'berlin' is the nodepath and the rest is just an argument.

Pleeeeeease... Anyone? Any idea? Is there some stupid and simple solution I simply don't come up with?