思绪的空中生活

用.htaccess去掉www
域名本来就长了,利用.htaccess重定向网址不要www,个人觉得看得舒服点。Options +FollowSy...
扫描右侧二维码阅读全文
30
2016/12

用.htaccess去掉www

域名本来就长了,利用.htaccess重定向网址不要www,个人觉得看得舒服点。

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,NC,L]

  • 没有相关文章
  • Last modification:December 30th, 2016 at 12:46 am
    If you think my article is useful to you, please feel free to appreciate

    5 comments

    1. xqiushi

      最后nginx配置搞定

    2. xqiushi

      第一行要吗?

    3. 小吉樣

      好在域名短233333

      1. 小吉樣
        @小吉樣

        不是2333

      2. 思绪的空中生活
        @小吉樣

        你是来秀优越感的吗[挖鼻屎]

    Leave a Comment Cancel reply