如何将多个子目录指向根Web目录

In my drupal web site I want to show filtered data based on user selected city. User can choose the city he belongs to (or intrested in) then I want to redirect him to mysite.com/cityname but it should point to the same webroot.

Is this possible?

htaccess file in your root directory and put following code

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^([a-zA-Z0-9]+)$          index.php?search=$1

And you can access you http://yourdomain.com/city-name

And you can get cityname in $_GET['search'] parameter

I hope this will help you..

Thanks

In your .htaccess

RewriteEngine On
RewriteRule ^(.*)$ /index.php?city=$1 [L]

To a user on your site, they will see and navigate to this:

http://example.com/city

But the real page would be something like this:

http://example.com/index.php?city=usercity