I would like to have the following:
http://london.domain.com/ http://newyork.domain.com/bronkx/ redirecting to index.php?subdomain=%1&neighborhood=%2
RewriteEngine on RewriteCond %{HTTP_HOST} ([.]+).domain.com$ [NC] RewriteCond %{REQUEST_URI} /([/]+)?$ [NC] RewriteRule /(.*)/?$ /index.php?subdomain=%1&neighborhood=%2 [L]
what is wrong here?
thanks
Try something like this:
RewriteEngine On RewriteCond %{HTTP_HOST} ^([^.]+)\.domain\.com$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/?$ /index.php?subdomain=%1&neighborhood=$1 [L]