MATH‎ > ‎

MATHNET website to GLUE

To move your personal web site from the old Mathnet system to the new system. Below your directory ID is the account you use to logon to ARES, Testudo, campus wireless, etc.

  1. Log on to any Mathnet machine
  2. type "cd public_html"
  3. type "tar -cvzf pub.tar.gz *" (this step will not work if you don't have the space for the compressed archive file)
  4. type "scp pub.tar.gz directoryID@gluemachine:~/../pub" (type your directory password when prompted)
  • Note: In step 4, for gluemachine you can use or any of the Glue machines in the Math 3207 lab which are named through
  1. Log on to any Glue machine (see note above for some possibilities)
  2. type "cd ../pub"
  3. type "tar -xvzf pub.tar.gz" (this step will not work if you don't have enough space available)
  4. type "rm pub.tar.gz" to remove the archive file

If you want a public_html link on the new system that points to the location of your new web site, do the following.

  1. Log on to any Glue machine
  2. type "rm public_html" to be sure any incorrect links have not been copied from the old system
  3. type "ln -s ../pub public_html"

Your web site should now be accessible on the new system but one additional step is required to send visitors from the old system to the new system.

  1. Log on to any Mathnet machine
  2. type "cd public_html"
  3. create a new file called .htaccess with the following information in it. Copying the information below will probably work best and then replace directoryID with your directoryID.

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)$$1 [R=301,L]

Now, if you go to, you should see the URL change to It is a good idea to test out multiple links on different areas of your site to make sure everything is working properly.

If you are using .htaccess files or file permissions to restrict access, please continue reading.

For .htaccess files, you need to make them look like the following:

If you want to restrict to users who have Glue accounts using campus directory ID and password:

UseUMDKrbAuth on

UseUMDHesiodAuth on

KrbMethodNegotiate off

AuthType Basic


<limit GET POST> require user <user1>

require user <user2>

require group <see to set up groups>


If you want to restrict to users in a .htpasswd file:

AuthUserFile /pub/<your_user_name_here>/directory/.htpasswd(or whatever you named the password file)

AuthName "<a descriptive title should go here"

AuthType Basic

<Limit GET POST>

   order Deny,Allow
   deny from all
   require valid-user


Of course, you need to create the .htpasswd file. There are lots of web pages related to this. I have used this one successfully.

Permissions in Glue work differently as they use access control lists rather than simple Unix/Linux permissions. To deny access to a file in your web space, remove read access for the owner. The command "chmod u-r <filename>" will remove access to the file for anyone trying to access it from the web.