售前咨询:400-100-2938
linux设置301重定向的方法:
设置.htaccess文件,在.htaccess文件里写上以下代码即可。
RewriteEngine onRewriteCond %{http_host} ^123.com [NC]RewriteRule ^(.*)$ http://www.123.com/$1 [L,R=301]
RewriteEngine on
RewriteCond %{http_host} ^123.com [NC]
RewriteRule ^(.*)$ http://www.123.com/$1 [L,R=301]
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:nginx怎么设置301重定向