Camen Design Forum

Password protection

append delete Nicolai

Is it possible to protect something like this; "index.php?id=something", with .htaccess?

Reply RSS

Replies

append delete #1. Kroc

Yes. I can't find an example unfortunately, but it revolves around setting an environment variable when a querystring is matched, and then later checking for the presence of the variable and invoking the password protection.

However, you should actually consider rejigging your navigation or design so that anything that does have to be password protected goes into a specific folder. You may be making more work for yourself than is necessary by trying to tie password protection to querystrings, esp considering the limitations of basic HTTP auth (use a HTML login form perhaps, far more compatible with a querystring)

append delete #2. Nicolai

Thanks Kroc, I'll search around a bit.

It's for a client. I would have to rewrite his entire system in order to ease it up, it's just a pile of crap. :P

#3. Tr

This post was deleted by a moderator

append delete #4. Nicolai

I wonder what he wrote.

append delete #5. Kroc

Oh, it was just "bplay" or something garbled. It could be some form of spam bot, which would be surprising if they've already sussed my measures.

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn