首页 文章

将www子域转发到域

提问于
浏览
1

如何自动转发/转换/转换(无论正确的术语是什么)URL作为www.example.com或www.example.com/blah/blah输入到example.com或example.com/blah/blah?我基本上想要推送任何与www子域一起进入的域,以转发到包括路径(如果有的话)的域 .

1 回答

  • 4

    在你的htaccess文件中使用它

    RewriteEngine On    
    RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]    
    RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
    

相关问题