waveform wrote:This I understand. I didn't realize there was a php file with redirection code .But even so, I looked in htdocs/xampp for both html, and php files with the welcome text and didn't find the one with the "Congratulations, XAMPP is working" text. And the root xampp folder at C/xampp only has .bat, and ini files, so it would have to be located in htdocs/xampp.
Its a bit complicated, i am honest, i did no research on how Xampp devlivers the Congratulation text, but think about the fact that it might be a PHP Script (i.e. c:/xampp/htdocs/xampp/index.php - formerly it has been c:/xampp/xampp/index.php - without htdocs between and realized via ALIAS configuration) and this script does not(!) necessarily contain all strings, which are echoed. There may be a configuration file (lets say strings.php) which is somewhere beyond the Xampp folder and is included on runtime by PHP. In some sophisticated environments (like WordPress or Joomla) you even wont find any file containing messages and strings - these are stored in a MySQL Database and put together on runtime by PHP.
All you have to know is the fact that: if you enter localhost or 127.0.0.1 in your browser, a TCPIP request is issued to that domain or IP, and 127.0.0.1 yields to your local PC (the browser does not know about that, he is stupid, he simply sends a request and waits for an answer), the Apache (Xampp) receives that request, "DocumentRoot" and "DirectoryIndex" tells him, which file to deliver (c:/xampp/htdocs is DocumentRoot and DirectoryIndex yields to index.php), so Apache *should* deliver index.php, BUT a file with extension PHP receives special treatement by Apache, it is NOT delivered directly back to the browser, instead it is send (like a stream, or a pipe as it is called on linux systems) to the PHP Interpreter, PHP parses and executes the code and finally the output of this script is passed back to the browser.
So Apache does not know that there is a xampp subfolder in htdocs, this is coded in the PHP Script, which tells the browser to send another request to the same server (again your Apache) in order to request 127.0.0.1/xampp/index.php and last not least then the output of this script ends the whole transaction and the user sees the welcome page.
P.S.: On some systems there is an index.html in the htdocs folder which contains "It works" (not "Xampp is working"); maybe you are mixing up these things? If there is no index.php or if DirectoryIndex is configured differently or if index.html is explicitely given in the URL, you will receive this message. It is the standard Welcome message if you install Apache NOT from Xampp, but manually from apache.com