Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

password protected folder can i pass it the password?

Status
Not open for further replies.

techexpressinc

Programmer
Oct 28, 2008
67
US
We have an website with a folder that userid/password protected. Is it possible for to pass the userid/password to the server?

The situtation is that is the employee area. So, when the employees log-in from the office; they do not to enter the userid/password. If they enter from some place other than the office we need them to enter the userid/password.

So, is there a way to can get the ip see the ip is the office ip then not require the password by passing it on to the server somehow?

Is this pie in the sky thinking?

Thanks for any help or direction.
Russ at techexpressinc.com
 
i changed restricted area to the below and still got the password prompt

Options -Indexes
AuthType Basic
AuthName "test area"
AuthUserFile /data/13/1/150/135/1313461/user/1406792/htdocs/employeesatisfy/.access.pwd
AuthPam_Enabled off

Require valid-user
Order allow,deny
Allow from 69.245.249.165
Satisfy Any
 
one tech person said to try to add 2 lines on the bottom which i did and it gave a different error so i am sure this .htaccess code does get hit below is a that code with the 2 lines added . it failed too . saying about a flag being invalid in the error log - can you take a look and let me know your thoughts - thanks russ

Options -Indexes
AuthType Basic
AuthName "test area"
AuthUserFile /data/13/1/150/135/1313461/user/1406792/htdocs/employeesatisfy/.access.pwd
AuthPam_Enabled off

Require valid-user
Order allow,deny
Allow from 69.245.249.165
Satisfy Any

RewriteEngine On
RewriteRule %{REMOTE_ADDR} !^69\.245\.249\.165 - [C]
 
I believe they meant to use RewriteCond, not RewriteRule. I did not want to use REMOTE_ADDR because I believe it can easily be spoofed and does not work with proxies.

here is a reference:


I think you need to talk to NS to figure out why this fails. I have seen this another time, and it was when a loadbalancer is "masking" the remote addr because of address translation, and I believe that is what is happening here. I can't tell from you log snippet if that is REMOTE_ADDR or the real ip.
 
I tried NS they will not help.

Options -Indexes
AuthType Basic
AuthName "test area"
AuthUserFile /data/13/1/150/135/1313461/user/1406792/htdocs/employeesatisfy/.access.pwd
AuthPam_Enabled off

Require valid-user
Order allow,deny
Allow from 69.245.249.165
Satisfy Any

RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^69\.245\.249\.165$
RewriteRule \intranethome.html
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top