emlog301重定向怎么做 如何实现不带www跳转到带www

admin2016-03-0230392
Linux 主机 Apache服务器 Mod-Rewrite 模式:修改.htaccess文件
<IfModule mod_rewrite.c>
                       RewriteEngine on
                       RewriteCond %{REQUEST_FILENAME} !-f
                       RewriteCond %{REQUEST_FILENAME} !-d
                       RewriteBase /
                       RewriteRule . /index.php [L]
                       RewriteCond %{HTTP_HOST} ^123.cn$ [NC]
                       RewriteRule ^(.*)$ http://www.123.cn/$1 [L,R=301]
                    </IfModule>

网友评论当前共有2条评论