Password protecting one area of a site


#1

Hello all!

I run a business that videos weddings. Our website is currently hosted on Dreamhost and I was wondering if there was a way to have certain sites password protected, while leaving all others normal…

For example, we’re wanting to offer a deal where, for a fee, we will host a bride’s wedding video on line so that they can show it off to friends and family. In order to do this, we need to create a directory for the bride, but have it password protected so that she could just send the login info to anyone who she wants to see it. So, let’s say it’s “mysite.com”. I’d like a bride to be able to enter “mysite.com/bride”, a username/password prompt come up, they type the info i give them, then have access to their personal site.

Understand?

Thanks for any input!

_Jordan


#2

You can easily set that up with .htaccess.


Simon’s website
Save $100 on 1-year plans with promo code [color=#CC0000]SCJESSEY100[/color] (details)


#3

That’s very easy to set up. Just put the video in its own directory, then use the Control Panel–>Goodies–>WebDAV / htaccess protection screen to set a user/pass combination for that directory, and you are good to go. You can set up as many directories as you want this way.

–rlparker


#4

that is right. now i’m getting into htaccess. it is really helpful

Save [color=#CC0000]$97[/color] (max discount) on dreamhost plans by using promo code: [color=#CC0000]97CRAZY[/color].


#5

Alright, that works great, but now I’m curious about another thing in a similar vein.

Now I’m curious how I’d go about having a “login” link on my home page that, when they client enters their own personal username/password they are redirected to their own part of the site. So rather than having to send each client a unique link to a password protected site, have a universal login link on the front page. Make sense?

Thanks for the help!


#6

surfwax95,

You’ll probably get a lot better luck with this question if you make a new thread (it really is a different subject altogether) :wink:

Short answer: That’s a job for some back-end server-side scripting - PHP or perl ought to work fine, and there are lots of code examples out there to get you started. You may even be able to find a script that pretty much does what you want “out of the box”

–rlparker