Question: XAMPP redirects from local unasked to the web
Posted: 23 Jun 2026, 03:00
I would like to operate and test my two websites www.thomas-ruf-projekte.ch and www.thomas-ruf.ch in the future locally under XAMPP.
I have XAMPP installed and created the two website directories:
In these directories, I have downloaded and installed all files of the corresponding websites from the Internet via FileZilla.
1. Now I can open the local website www.thomas-ruf-projekte.ch in the browser via d:\XAMPP\htdocs\www.thomas-ruf-projekte.ch\index.php, and it seems to work (with the only exception that absolute links within the website do not behave the same everywhere as on the web.) However, my installation is obviously not clean, because calling d:\XAMPP\htdocs\www.thomas-ruf-projekte.ch\ alone, as it should normally be entered, redirects directly to my website on the Internet.
2. On the local website www.thomas-ruf.ch, both calls (via index.php and via directory) redirect to the Internet website...
Do you have a tip on the easiest way to set this up so that the pages can be edited locally and on the web via the panel immediately, so that the following points are fulfilled:
Thank you
Best regards from Basel
I have XAMPP installed and created the two website directories:
Code
d:\XAMPP\htdocs\www.thomas-ruf-projekte.ch\
d:\XAMPP\htdocs\www.thomas-ruf.ch\
1. Now I can open the local website www.thomas-ruf-projekte.ch in the browser via d:\XAMPP\htdocs\www.thomas-ruf-projekte.ch\index.php, and it seems to work (with the only exception that absolute links within the website do not behave the same everywhere as on the web.) However, my installation is obviously not clean, because calling d:\XAMPP\htdocs\www.thomas-ruf-projekte.ch\ alone, as it should normally be entered, redirects directly to my website on the Internet.
2. On the local website www.thomas-ruf.ch, both calls (via index.php and via directory) redirect to the Internet website...
Do you have a tip on the easiest way to set this up so that the pages can be edited locally and on the web via the panel immediately, so that the following points are fulfilled:
- No annoying redirect from localhost to web
- Behavior of links in local work in the same way as on the live site
Thank you
Best regards from Basel