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?
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