FFan丶Blog / SEO / / 顶级域名301跳转至www

顶级域名301跳转至www

分类:SEO 发布时间:2020-01-15 11:17:31来源:FFan丶Blog
根目录新建.htaccess文件 RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www\\. RewriteCond %{HTTP_HOST} !^$...

根目录新建.htaccess文件

RewriteEngine On

RewriteBase /

RewriteCond %{HTTP_HOST} !^www\.

RewriteCond %{HTTP_HOST} !^$

RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]


上一篇:利用.htaccess绑定子域名到子目录

下一篇:没有了

猜你喜欢

  •     <!-- 声明文档使用的字符编码 -->     <meta charset='utf-8'>     <!-- 优先使用 IE 最新版本和 Chrome -->     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>

    html相关标签2020-07-06
  • <ul><!--{iCMS:article:list loop="true" row="20" }-->    <!--{if $article_list.first}--><li><!--{/if}-->    <!--{"$article_list.index % 2"}-->        <span><!--{$article_list.title}--></span>    <!--{if $article_list.index % 2}-->        <

    ICMS2020-07-13
  • CSS3 :nth-child() 选择器 定义和用法: :nth-child(n) 选择器匹配属于其父元素的第 N 个子元素,不论元素的类型。 n 可以是数字、关键词或公式。

    CSS2020-07-21
  • <script type="text/javascript">     $('.artbody *[style]').each(function(){    if($(this).css('text-align') == 'center')   $(this).css('text-indent', '0em'); });

    部分JS效果2020-07-30
  • if(location.toString().indexOf("abc.com") <= -1)     /*如果当前网址中没有abc.com*/ { document.location.href="/b.htm";   /*跳转到b.htm*/ } else

    部分JS效果2020-08-24