You're better off using a custom Router controller for that. Inchoo and Atwix have both tutorials describing how to do this.
The one from Atwix explains the easiest. Your Router.php
would look something like this
class [Namespace]_[Module]_Controller_Router extends Mage_Core_Controller_Varien_Router_Standard
{
public function match(Zend_Controller_Request_Http $request)
{
if ($request->getPathInfo() == 'file.txt')
{
$request->setModuleName('[module]')
->setControllerName('index')
->setActionName('index');
return true;
}
else
{
return parent::match($request);
}
}
}