Our web server provides a means to control access by two different methods. The first method is to restrict where you can connect from, while the second method is to restrict who can connect to a page. Both methods require the use of a file called .htaccess in the directory you want to protect. Creating the .htaccess file is not done using FrontPage. You'll need to use something like SecureCRT or PuTTY to login to the server and create the .htaccess file at the shell prompt.
Getting to the Shell Prompt
If necessary download PuTTY to your computer. The following instructions assume that you are connected to the Internet. Using PuTTY do the following:Open putty.exe In the Host Name box enter: www.gpc.edu or facstaff.gpc.edu Then in the Protocol section select the SSH radio button. At the bottom of the screen, select the |
Restricting by Location
This type of restriction can be helpful if you have content that you only want people to be able so see if they are on a GPC campus.
Example Code
This example will show how to restrict a directory so that only people who are physically located on one of the campuses. It assumes that you have already created the pages using FrontPage and published them to the web server via FTP.At the shell enter: cd public_html press Enter ls -a press Enter cd directoryname press Enter pico press Enter Type the following code: <Limit GET> order deny,allow deny from all allow from gpc.edu allow from gpc.peachnet.edu allow from dc.peachnet.edu </Limit> Press CTRL + X to save and close the file. |
Restricting by Identity
This type of restriction only allows people assigned a username and password to access your pages. This method does NOT use the same password file that is available on the system. You have to create the password file, as shown below.At the shell enter: cd public_html press Enter ls -a press Enter cd directoryname press Enter pwd then press Enter |
This method does NOT use the same password file that is available on the system. You have to create the password file, as shown below. (This example assumes you want to protect a directory that you would access via the web as http://www.gpc.edu/~username/directoryname).
At the shell enter: cd public_html press Enter ls -a press Enter cd directoryname press Enter htpasswd -c passwd.db login Adding user login New password: Re-type new password: |
In the above example, you should replace login with the username you want to create. If you have already created accounts for this directory, you should use the following commands, instead:
At the shell enter: cd public_html press Enter ls -a press Enter cd directoryname press Enter htpasswd passwd.db login (*) Adding user login New password: Re-type new password: |

