# https://city.site.com/search/
RewriteCond %{HTTP_HOST} ^(?>www\.|)([\w-]+)\.site\.com$ [NC]
RewriteRule ^search/$ list.php?crt_city=%1 [L,QSA]
# https://city.site.com/
RewriteCond %{HTTP_HOST} ^(?>www\.|)([\w-]+)\.site\.com$ [NC]
RewriteRule ^$ st.php?crt_dealer=%1 [L,QSA]