PDA

View Full Version : .htaccess Password Generator with "/?title,31" like files



mmtgv
01-24-2010, 11:04 AM
1) Script Title: .htaccess Password Generator

2) Script URL (on DD): http://tools.dynamicdrive.com/password/

3) Describe problem:
Everything gone well, but my website files are public!
This is the website: http://www.parfum-by-federico.ro/
The database is a text file, and the webpages are dynamic. I think that this is the problem, because I don't have files like file.html, instead I have something like this: http://www.parfum-by-federico.ro/?colectia-clasica,31.

So, what to do to password protect this kind of files ?

djr33
01-24-2010, 11:11 AM
Those are not "files". Those are variables added to the url going to a single file.

index.php and index.php?variable=value are both the same page.

You can use .htaccess to require a password for both, but I don't believe you can set it for only one.

However, if you are using that kind of code, you can probably do this in another way with the server side code (php? asp? cgi?).

You could probably find a complex way to do this with .htaccess, but not in the simple .htpasswd way.