Q:

htaccess redirecting url but keeping typed url

I have managed to use .htaccess to redirect the domain url to a page within the site.  Actually, I didn't learn any of it, I just used a web form from the server.
Anyway, it only achieves the effect of redirecting and shows the newly redirected URL, whereas I want it to remain as the one typed in.
Yes this surely is a common question, but I tried following the advice of another post on this site regarding this (removing some flags) and it didn't help.
Here's my .htaccess file right now (more-or-less):
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.a-site.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.a-site.com$
RewriteRule ^$ http://www.a-site.com/a-file.html [L]

A:

Your conditions seem extraneous:
RewriteCond %{HTTP_HOST} ^a-site.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.a-site.com$

Which could also be written as:
RewriteCond %{HTTP_HOST} ^(www\.)?a-site.com$

Looks like it's the same host match done twice. But your RewriteRule will always redirect the browser because it has a http://www.a-site.com in front, which tells apache to redirect with a 302. Try removing it:
RewriteRule ^$ /a-file.html [L]

