How to rewrite a subdomain to a file rather than a directory


I am successfully making the following redirection.  The URL:
delivers the index.html file that resides on my server here:

Here's how I did it:
I added an A record with a wildcard before is in a VirtualHost container in Apache's httpd.conf (because it's not the main domain that my server serves)

Here are the pertinent lines from httpd.conf:

<VirtualHost My.IP.Add.ress:80>
   Options +FollowSymLinks
   Options +Indexes
ServerAlias *               
DirectoryIndex index.html
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.* [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.MyDomain\.com
RewriteRule ^(.*) /%1/$1 [L]

What I would LIKE to do is have
redirect NOT to a subdirectory, but rather to a file in the root directory.  I'd like to deliver the file:

Can this be done?  I can't quite figure it out.
--Steve D.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Steve BinkCommented:
Same idea as your example:

RewriteRule ^/?$ [R]

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
StevenMilesAuthor Commented:
Perfect.  Yup, just for some reason couldn't get that last step myself.  Thanks mucho.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.