All localhost http links are redirecting to https

烂漫一生 提交于 2019-12-11 03:33:18

问题


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.



来源:https://stackoverflow.com/questions/31595740/all-localhost-http-links-are-redirecting-to-https

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!