RewriteEngine On
RewriteCond %{HTTP_HOST} ^xxxx.com
RewriteRule ^(.*)$ http://www.xxxx.com/$1 [L,R=301]
RewriteCond %{REQUEST_URI} !\.[a-zA-Z]{2,4}$
RewriteCond %{REQUEST_URI} \.(html)$
RewriteCond %{REQUEST_URI} !^/admin.*
RewriteCond %{REQUEST_URI} !^/livechat.*
RewriteCond %{REQUEST_URI} !^/blog.*
RewriteCond %{REQUEST_URI} !^/editors.*
RewriteCond %{REQUEST_URI} !/cpanel.*
RewriteCond %{REQUEST_URI} !/frontend.*
RewriteRule (.*) index.php?%{QUERY_STRING}

这是apache下的,谢谢!!