My b2evolution Version: 2.0.1
I want to rewrite my blogs url like http://doman.com/index.php/blog
to subdomain by htaccess (http://blog.domain.com). I tryed these codes but they didnt work. what is the
correct code?
RewriteEngine on
RewriteCond %{HTTP_HOST}!^www\.
RewriteCond %{HTTP_HOST} ^(.+)\.domain\.com
RewriteRule ^(.*) /index.php/%1 [L]
or
RewriteEngine on
RewriteCond %{HTTP_HOST}!^(www\.)?domain\.com [NC]
RewriteCond %{HTTP_HOST} ^(.*)\.domain\.com [NC]
RewriteRule .* /index.php/%1 [L]
or
RewriteCond %{REQUEST_URI}!^/index\.php
RewriteCond %{HTTP_HOST}!^www\.domain\.com
RewriteCond %{HTTP_HOST} ^([^.]+)\.domain\.com
RewriteRule ^$ /index.php/%1