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
Printable View
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
Code:Allow from 10.0.0.0/16
Allow from .school.lea.sch.uk
require valid-user
satisfy any
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