I have a .htaccess file, for example:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?example.com$ [NC]
RewriteRule ^/?market/(.*)$ http://market.example.com/$1 [L,R=301]
RewriteRule ^/?buddies/(.*)$ http://buddies.example.com/$1 [L,R=301]
RewriteRule ^/?bazaar/(.*)$ http://bazaar.example.com/$1 [L,R=301]
It works great in a subdirectory of the market. It redirects to a subdomain. But there is a problem with the other 2 subdirectories.
ERROR FOR OTHER 2 subdomains:
The page isn't redirecting properly
What should I do to overcome this problem?
source
share