搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Firefox redirects my local virtual server website url to an external url

  • 無回覆
  • 1 有這個問題
  • 29 次檢視
more options

I am a web developer who makes websites on my local work station. I use XAMPP (Apache & PHP) on Windows. I edit my Windows hosts file to include server aliases like:

127.0.0.12 pierremarketinggroup

...and then I add a virtual server to the Apache httpd.conf file, so that when I type:

http://pierremarketinggroup/

...in my address bar, it will take me to the local website on my workstation hard drive.

This has been working for years on Firefox, but now, after upgrading to PHP 8 in XAMPP and some fiddling around, Firefox no longer respects the local domain, but instead will redirect me to

https://www.pierremarketinggroup.com

...which doesn't exist, yet.

Firefox does the same thing with all my local, virtual domains. Chrome, Edge, and other web browsers continue to work normally, so I know my Apache and Windows hosts settings are correct.

What I have tried: - Cleared content cache, restarted Firefox. Didn't fix the problem. - "Refresh" Firefox. I think this was a mistake, as I lost all my logins, but too late now. Even so, it didn't fix the problem. I type the local address into address bar, and Firefox doesn't read it, or doesn't look up the local domain, or I don't know what.

I used to be able to fix the problem by going to Privacy & Security -> Cookies and Site Data -> Clear Data -> check Cached Web Content -> Clear, and that would usually fix the problem. Now it doesn't fix the problem.

How do I force Firefox to look up the domain on my local machine, instead of redirecting me to an external (and usually unrelated) url?

I am a web developer who makes websites on my local work station. I use XAMPP (Apache & PHP) on Windows. I edit my Windows hosts file to include server aliases like: 127.0.0.12 pierremarketinggroup ...and then I add a virtual server to the Apache httpd.conf file, so that when I type: http://pierremarketinggroup/ ...in my address bar, it will take me to the local website on my workstation hard drive. This has been working for years on Firefox, but now, after upgrading to PHP 8 in XAMPP and some fiddling around, Firefox no longer respects the local domain, but instead will redirect me to https://www.pierremarketinggroup.com ...which doesn't exist, yet. Firefox does the same thing with all my local, virtual domains. Chrome, Edge, and other web browsers continue to work normally, so I know my Apache and Windows hosts settings are correct. What I have tried: - Cleared content cache, restarted Firefox. Didn't fix the problem. - "Refresh" Firefox. I think this was a mistake, as I lost all my logins, but too late now. Even so, it didn't fix the problem. I type the local address into address bar, and Firefox doesn't read it, or doesn't look up the local domain, or I don't know what. I used to be able to fix the problem by going to '''Privacy & Security -> Cookies and Site Data -> Clear Data -> check Cached Web Content -> Clear''', and that would usually fix the problem. Now it doesn't fix the problem. How do I force Firefox to look up the domain on my local machine, instead of redirecting me to an external (and usually unrelated) url?