This is driving me nuts. I'm trying to install XAMPP 1.4.2 (don't ask, I'm not a programmer and I need to run a PHP4 app) and I can't get virtual hosts to work. Now XAMPP 1.4.2 is supposed to have PHP4 and Apache 2.0 Problem is, no matter what, I can't get name-based virtual hosts to work.

I have the correct entries in the hosts file, but the virtual hosts don't work.
My httpd.conf is configured like this

# Use name-based virtual hosting.
#
NameVirtualHost *:80

And then like this:
<VirtualHost *:80>
DocumentRoot c:/xampp/htdocs
ServerName localhost
</VirtualHost>

<VirtualHost yata4>
DocumentRoot c:/xampp/htdocs/yata4
ServerName yata4
</VirtualHost>


I have 127.0.0.1 localhost and 127.0.0.1 yata4 in "hosts" and the paths are correct.

The problem is it doesn' work properly. When typing http://localhost I get redirected to http://localhost/xampp/splash.php as expected. But when I go to http://yata4 I get the same content as that of the localhost (i.e. get redirected to http://yata4/xampp/splash.php) I'm at the end of my wits, I've read countless tutorials about name-based virtual hosts on the web and I couldn't get any of them to work as expected. What am I doing wrong?