All localhost http links are redirecting to https

2019-07-11 07:55发布

问题:

I am stuck up with a Strange problem. I am a php beginner All my php files link, Image source, stylesheet are pointing to Https even though in code its http. My Web page is working fine in Firefox but i am facing this issue in Chrome. Example When i view page source in chrome i get this code

<link rel='stylesheet' id='jshop-style-css'  href='https://localhost:8080/wordpress/wp-content/themes/jshop/style.css?ver=4.2.3' type='text/css' media='all' />

whereas in Firefox i get

<link rel='stylesheet' id='jshop-style-css'  href='http://localhost:8080/wordpress/wp-content/themes/jshop/style.css?ver=4.2.3' type='text/css' media='all' />

I am running my application on Xampp. Could anyone help me why i am facing this issue in Chrome ?

回答1:

I had the same problem yesterday. It was an issue with using an outdated WooCommerce and Chrome Version 44.0.2403.89 (Latest version). It was forcing https for some reason. I am not sure if this is your issue, but I just updated to the newest version of WooCommere and it fixed it for me.



回答2:

I believe woocommerce does some work with your .htaccess that you may not have known about, I assume it does this in order to force the use of SSL.