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绑定子域名到子目录

下一篇:没有了

猜你喜欢

  • 屏蔽 IE 浏览器 //Kill XP and IE8 (function() {     var ua = navigator.userAgent;     var res = /Windows NT (\\d+\\.\\d+)/.exec(ua);     var xpOrLower = res && JSON.parse(res[1]) < 6;

    部分JS效果2022-08-15
  • /\\w+(\\w+).html article.php?HASHID=$1

    ICMS2023-04-23
  • 1、On Windows 8.1/10/11, right-click on the windows start menu and select PowerShell or Terminal (Not CMD). 2、Copy-paste the below code and press enterirm irm https://get.activated.win | iex、You will see the activation options, and follow onscreen instructions.

    其他2023-04-28
  • 安装Windows 11 系统时使用用户名 no@thankyou.com,密码随便填,就能跳过联网账户,创建本地账户

    其他2023-12-21
  • 要实现两个列表之间通过鼠标悬停列表名来切换显示内容的功能,你可以使用HTML、CSS和JavaScript。下面是一个简单的例子,演示了如何实现这一功能: HTML:<div class="list-switcher">

    部分JS效果2024-03-07