Why is it that when I write the directive
Alias /hello /myfile.php it works fine, but if I write
Alias /hello /myfile.php?myvar=test apache gives me 'NOT FOUND'.
According to the docs, the alias target can only be a file or path. Is suspect you don't have a file literally called
myfile.php?myvar=test on your filesystem.
You might be able to do this with rewrite rules, but in this case, it sounds much easier to handle the default parameter in your script itself.