所有localhost http链接都重定向到https [英] All localhost http links are redirecting to https
问题描述
我遇到了一个奇怪的问题。我是一个PHP初学者所有我的PHP文件链接,图像源,样式表指向Https即使在代码其http。我的网页在Firefox中工作正常但我在Chrome中遇到了这个问题。
示例
当我在chrome中查看页面源时我得到此代码
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' />
而在Firefox中我得到
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' />
我在Xampp上运行我的应用程序。任何人都可以帮我解决为什么我在Chrome中遇到这个问题?
I am running my application on Xampp. Could anyone help me why i am facing this issue in Chrome ?
推荐答案
昨天我遇到了同样的问题。这是使用过时的WooCommerce和Chrome版本44.0.2403.89(最新版本)的问题。由于某种原因,它迫使https。我不确定这是不是你的问题,但我刚刚更新到最新版本的WooCommere,并为我修复了它。
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.
这篇关于所有localhost http链接都重定向到https的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!