peepsnet Posted August 27, 2008 Share Posted August 27, 2008 I am lookin for a way to password protect a directory but allow "access to all" to a few files. I am running a webstats package and only want visitors to be able to access the javascript file that is included on each webpage. using .htaccess Thanks, Don Link to comment https://forums.phpfreaks.com/topic/121563-protect-dir-but-allow-access-to-a-filefiles/ Share on other sites More sharing options...
peepsnet Posted September 3, 2008 Author Share Posted September 3, 2008 So is this not possible or does nobody know how... Do I have to add more to the explination or what? Don Link to comment https://forums.phpfreaks.com/topic/121563-protect-dir-but-allow-access-to-a-filefiles/#findComment-632905 Share on other sites More sharing options...
steviewdr Posted September 3, 2008 Share Posted September 3, 2008 So you want: Use htaccess & htpasswd to protect an entire Directory. Allow exceptions to particular files within that Directory I don't think it is possible. What you could do is: 1. Obviously use two separate directories. 2. Use htaccess & htpasswd to protect particular filetypes using a wildcard, e.g. *.jpg. -steve Link to comment https://forums.phpfreaks.com/topic/121563-protect-dir-but-allow-access-to-a-filefiles/#findComment-632962 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.