Web site /Cpanel gurus! Please help

taltos1

Senior member
Nov 15, 2001
892
0
0
In cpanel I created a folder "files" and password protected it (using cpanel as well). I want only users with the password to be able to get the files in "files." When browsing to that location in the web browser (www.mysite.com/files) the popup comes up asking for the user and pass. Now if the user does not know the user/pass and hits "cancel" they get pushed to a plain white page that says "Authorization Required" and instead of that I would like user to get pushed to the homepage. Can anyone tell me how to do that? Can it be done via the .htaccess file?

Thanks a lot.
 

jjones

Lifer
Oct 9, 2001
15,425
2
0
Try this in your .htaccess file.

ErrorDocument 401 /index.html

Replace index.html with whatever your home page file name is, if it is not in fact, named index.html.
 

ASK THE COMMUNITY