RewriteEngine On
Options -MultiViews
AcceptPathInfo On

# multiviews functionality
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^([^/]+)(/?)(.*?)$ $1.php$2$3 [L]

# 1)
# http://www.example.com/city-name/...
# must rewrite to
# http://www.example.com/index/city-name

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([0-9a-z-]+)/?$ index/$1 [NC]