Redirect http:www.domain.com to http:domain.com

xiaoxiao2021-03-05  23

Make Your Site Class B Sep 3, 2003

Class B means that all of the traffic to http://www.yourdomain.com is politely and silently redirected to http://yourdomain.com. This is currently the preferred no-www classification as it does not inconvenience your users, but It Does Assert The Deprecated Nature of The WWW Subdomain.

The process of making your domain a Class B is quite simple. All you need to do is create or modify a file called .htaccess located in the root directory of your site and add the following lines, changing the red text to match your domain.

ReWriteEngine on shutritecond% {http_host} ^ www / .domain / .com $ [nc] REWRITERULE ^ (. *) $ Http://domain.com/$1 [r = 301, l]

Built a .htaccess file at the site http://www.domain.com root of the root, the content is as above.

转载请注明原文地址:https://www.9cbs.com/read-33534.html

New Post(0)