Apache send 403 instead of 401

Is there a way to get apache to send a 403 instead of a 401 with some config in an .htaccess file? I'm using dreamhost btw.

Edit:

I should better explain what I am doing. I am doing an HTTP auth login page with jQuery. My goal is to bypass that browser popup login window. To do this, I want the server to give me a 403 error when I try to access a file in the protected realm, as opposed to the 401 I am currently getting by default. When I get that 403, I can run a function that tells the user they have a password wrong instead of that browser popup, which doesn't tell the user they got information wrong, it just makes the site look bad in the end.

thanks =)


You can use a rewrite rule to produce a 403.

RewriteEngine on
RewriteRule myfile myfile [F]

F, in this case, means forbidden (403).

EDIT
...and yes, this goes in the .htaccess file.

EDIT
As described in a comment to radius answer, you'd like to check if a user is authorized. I don't know how you're doing your authorization, but my guess is that it's not immediately possible. I usually do my authorization in PHP, in which case you can simply do a header('HTTP/1.1 403 Forbidden');, but you seem to be using some other mechanism (apache internal I suppose).