apache .htaccess 多域名、www重定向
.htaccess
RewriteEngine on
//多域名重定向
RewriteCond %{HTTP_HOST} ^blog.dotcoo.com$ [NC]
RewriteRule ^(.*)$ http://www.dotcoo.com/$1 [R=302,L]
//www和非www选择
RewriteCond %{HTTP_HOST} ^dotcoo.com$ [NC]
RewriteRule ^(.*)$ http://www.dotcoo.com/$1 [R=302,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteBase /
RewriteRule . /index.php [L]