.htaccess pw protected folder refresh to access page?

Viewed 45

I am using a .htaccess file to pw protect a downloads folder. The website links to the files contained in the folder, and that works to some degree. When one clicks on a webpage link to the file in the folder, it pops up a login box, but goes to the file in the directory, rather than leaving them on the webpage from which they are accessing the file. This only occurs in the first instance of login, but after that, it works perfectly. To explain further, user goes to webpage, clicks link, .htaccess login pop-up displays, login occurs, but it displays only this file and path in the browser. I am an avid front end designer, but when it comes to the back end, please over explain.

I tried throwing in an html file with an auto refresh to the previous page, but it doesn't load that file.

AuthType Basic
AuthName "Access restricted"
AuthUserFile /home/dir/.members
AuthGroupFile /dev/null
AddType application/octet-stream .zip
AddType application/octet-stream .exe
require valid-user

0 Answers
Related