• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

GoDaddy Password Protect Home Directory

August 2, 2011 by Webhead

Problem:

GoDaddy makes it simple to password protect a directory.  You just go to their file manager, click on a directory, click on Permissions, fill out a user and password and you’re done.  Bad thing is that you can’t password protect anything in the public root folder.

 

Solution:

Easiest solution is to password protect a subdirectory, open .htaccess, copy the code there and paste it into  your .htaccess in the root public folder and then wait a few hours.  Seriously, just wait.  I followed these steps and didn’t wait, got worried it wasn’t working and undid everything.  a few hours later I ran into this post:  http://www.besthostratings.com/articles/http-auth-php-cgi.html

With that post I felt that I could hackily get the authenticated username and password and then use PHP to determine whether the username/password is correct or not.  Then I could show or not show what I needed.  After all, this was only temporary until the client’s site went live.  I soon found out however that the first solution worked this time.  Go figure.

 

 

 

 

Filed Under: Server Stuff Tagged With: apache, goDaddy, hosting, htaccess

Primary Sidebar

Topics

502 apache apple bluehost bootstrap buddypress chrome cloudways cms css debug drupal eCommerce firebug firefox git goDaddy google google analytics google maps hacked hosting htaccess html html 5 icons IE crap image iPad iPhone javascript jquery linux localization mac os x ms sql mysql open source optimize php tinymce wordpress wpengine yii youtube




Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools