How to password protect my subdomain?
February 21, 2006 5:34 PM   Subscribe

How can I password protect my subdomain? When someone enters in the domain subdomain.mydomain.com I want to require a login.

I'm using godaddy hosting and not a premium account so it seems I don't have directory access control. I'm using MS Frontpage 2003. Some Frontage documentation says to reference an option that seems to be not available. The "Tools=>Server option is not enabled. I never thought it would be sooo much trouble!

Thanks for any help!
posted by kmurray24 to Computers & Internet (3 answers total) 2 users marked this as a favorite
 
Best answer: Do you have shell access?
posted by Loto at 5:42 PM on February 21, 2006


Depending on how their server is configured you may be able to upload a .htaccess file into whatever directory you want to protect. Of course, this usually requires the creation of a .htpasswd file as well, which can be a bit tricky to do outside of a unix/linux shell (since it encrypts the password as it creates it). However, on the off chance that your account is being hosted on a windows machine, you can upload a .htpasswd file with unencrypted passwords and it will be ok (it sounds scary, but most servers are configured not to allow download of .ht files, so unless somebody compromises the entire server (or if it's an inside job) you should be ok). Basically the syntax is as follows:
.htpasswd---------username:passwordusername2:password2etc....htaccess---------AuthType BasicAuthName "Whatever"AuthUserFile /absolute/pathto/.htpasswdrequire valid-user
Of course, this only works if they're using apache, running windows, and haven't specifically disabled .htaccess rules. Still it might be worth a shot. Just drop the .htpasswd file wherever and put the .htaccess file in the dir you want to protect. The important thing is making sure that the "AuthUserFile" line is referencing the .htpasswd you created/uploaded.

[On Preview] Yeah, shell access would make confirming or disconfirming the availability of .htaccess rules easier. =)
posted by idontlikewords at 5:48 PM on February 21, 2006


You can make a 100% frame on index.html and have it direct to a password protected directory, perhaps?
posted by vanoakenfold at 8:19 PM on February 21, 2006


« Older how to write naturally   |   PS2 fan noise, make it stop. Newer »
This thread is closed to new comments.