如何将https应用程序从www重定向到非www

时间:2018-09-23 07:50:42

标签: .htaccess redirect http-redirect

我没有找到任何答案。我希望我的React应用程序将请求从 www 重定向到 non-www ,并且默认情况下将正确打开非www URL。

对于从非www 重定向到 www 的方法,有一些答案,但是我需要相反的解决方法。

我正在运行打开了 https 的应用,现在我的 .htaccess 代码看起来像这样并且运行良好:

//Landing.js js components
import React, { Component } from 'react';

class Landing extends Component {
    componentDidMount() {
        console.log(window.myVar); //undefined
        console.log(this.myVVar); //undefined
        
        
    }
    
    render(){
        return (
            <div>

                
                
            </div>
        )
    }
}

export default Landing;

0 个答案:

没有答案