Enter your email address:

Delivered by FeedBurner

Sign up to receive a reply:

Powered by MT-Notifier


How do I protect my blog with a single username and password?

Vote 0 Votes

I call this the ".htaccess method" because you will be creating a file called ".htaccess" (note the dot that precedes the word). You will also create a ".htpasswd" file. To set up .htaccess password protection, follow these instructions:

  1. Log into UThink and select your blog from the dashboard. You should now see the name of your blog in a tab in the upper left corner, adjacent to "Write Entry". Double-check to make sure that you're not password-protecting the wrong blog.
  2. Go to Design > Templates
  3. Click on "Create index template"
  4. Give your new index template a name, "Htaccess file"
  5. In the body, paste in this code:
    AuthUserFile /htdocs/blog/[your Internet ID]/[your blog directory name]/.htpasswd
    AuthName "You need to log in to view this content"
    AuthType Basic
    Allow from all
    Require valid-user

    But note that [your Internet ID] needs to be replaced with your x500. Similarly, [your blog directory name] needs to be replaced with your blog directory name. It might not be the same as your blog name. Look at the URL for your blog. The blog directory name is the last name in the URL. For example, in the URL http://blog.lib.umn.edu/heinz062/uthink-forum/, the blog directory name is "uthink-forum".

    For individuals with custom URLs, your x500 might not even be in the URL. If your URL is http://blog.lib.umn.edu/myblog, then the first line of the .htaccess file should read:

    AuthUserFile /htdocs/blog/myblog/.htpasswd

  6. Before you save, expand the Template Options menu (if it's not expanded already.) In the "Output File" field, type: .htaccess

    Don't forget the period.

  7. Now click Save.

  8. For the following steps, you'll need an encoded password. Use this htaccess password generator to encode the password you want to use. You'll get something like this: goldy:I2ZU0L1SBgrMw
    We'll use this in a moment.

  9. Go back to Design > Templates, then click on Create Index Template again.

  10. In this second template, call it "Htpasswd file"

  11. In the body, paste in the password that you generated before. It would look something like: goldy:I2ZU0L1SBgrMw

  12. Expand the "Template Options" menu if it's not expanded already. In the Output File field, type: .htpasswd

  13. Save your new template

  14. Re-build your entire blog site.

That should do it! Now your blog is password protected.

Note: it is possible to protect your blog with x500 authentication, just like other U of M web services. Search this forum for the words "password" and "x500".

Add a Reply

Forum Groups

Classic Blogs and General Info

29 42

Last Topic: Can I use PHP code in my blog? by Charlie Heinz on Jan 9, 2012



Be the first to post a topic in this forum

Blogging Principles

Be the first to post a topic in this forum

Other Template Sets

Community Blogs

Be the first to post a topic in this forum

Community Forums

Be the first to post a topic in this forum

Widget Marketplace