?
Solved

HTACCESS or other directory level password system needed

Posted on 2003-02-23
5
Medium Priority
?
220 Views
Last Modified: 2010-04-20
I have a directory that I would like to limit access to. Right now, I have a java applet that requires a password, but of course, once in, they can bookmark the page. I'd like to add something like htaccess to limit access.

My host is using a Windows box, and I know that htaccess is usually limited to Unix and Apache.

Anyone have ideas? Turnkey solutions would be great - I'm bright, but lack of time is a big concern. If not, detailed instructions would be great as well

Greatly appreciated.

Marc
0
Comment
Question by:mcsteven
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 1

Accepted Solution

by:
blainehilton earned 152 total points
ID: 8010168
Well you could code a solution in Windows native ASP, or in PHP.  I would check out www.hotscripts.com and go to ASP and then Password Protection.

You are correct that .htaccess files are limited to unix, and I believe just the Apache server.  If you want to do something like .htaccess though Windows IIS supports the same basic thing, except I believe you set it up through the server and tell the server which directory it is in.

Hoped that helped

--
Blaine Hilton
0
 
LVL 1

Assisted Solution

by:zerofill
zerofill earned 148 total points
ID: 8015263
I httpd.conf you must create something like this:

<Directory /path/to/your/directory>
    ....
    AllowOverride All
    ....
</Directory>

AccessFileName .htaccess #or whatever you want

#uncomment this lines:
LoadModule auth_module modules/mod_auth.so



create .htaccess file in your directory with contents:

AuthName "restricted"
AuthType Basic
AuthUserFile "D:\bin\Apache2\conf\.pass" #or where you password file is
<LIMIT GET POST>
require valid-user
</LIMIT>

Go to path/to/Apache/bin directoy and run "htpasswd.exe [-c to create new file].pass username". See help for more optins
Copy .pass to where your path is (defined in .htpasswd)

This must work
Let me know id something is wrong or I have missed something

p.s. If you don't get a window asking for username and password, possible reason is that you have AllowOverride None somewhere in httpd.conf that applies to the desired folder.
0

Featured Post

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question