Custom url theme for drupal We got site written on Drupal.

We want to make Nginx caching but there is one problem we met.

Nginx caching works perfect, but if user A will go to page http://domain.com and nginx cache it. User B use mobile theme http://domain.com/?theme=mobile and went to http://domain.com/ , he will see desktop version instead of mobile version.

I want to make something like http://domain.com/any/url/path for desktop version and http://domain.com/mobile/any/url/path

Is it possible? Where can I found information about how to do it?
If you are using Drupal6 Have a look at Mobile Tools module.


  The Mobile Tools module provides Drupal developers with some tools to
  assist in making adjustments to your site based on the visitor's
  device.


Once you install the module you can define different paths for desktop and mobile, then browser will detect the device and redirect to corresponding path.
For Drupal 7 Mobile Switch module is the alternative