I am updating an intranet site and I want the staff to be able to access it from within school freely, but be prompted for a username/password when accessed from outside school.
Can this be done via the .htaccess file?
Cheers

I am updating an intranet site and I want the staff to be able to access it from within school freely, but be prompted for a username/password when accessed from outside school.
Can this be done via the .htaccess file?
Cheers

I doubt it as I would think the .htaccess would restrict from internal as well.
Ben

I was hoping i could stick some form of ip range in it to allow access from the schools ip range.

Or maybe not:
Apache Week. Using User Authentication
Says that you can set it so that hostname can be used to allow access, so if they are inside the company no username password required but outside it is.
Ben
SYSMAN_MK (15th April 2008)
Code:Allow from 10.0.0.0/16 Allow from .school.lea.sch.uk require valid-user satisfy any
SYSMAN_MK (15th April 2008)

Cheers guys. Ended up going with the following code. Works a treat.
Code:Require user staff Order allow,deny Allow from .%schools domain% Satisfy any
There are currently 1 users browsing this thread. (0 members and 1 guests)