View Full Version : Including a user name & password in a submit button
fredbear
04-26-2001, 12:46 AM
On my website www.fredbear.com I have a discussion page and too many people are bookmarking just this discussion page. I want everybody to enter the discussion page through the index page ( I want them counted on my hitcounter ) So what I would like to do is...Password protect a folder and Place a submit or enter button with a username and password. So the only way anybody gets a username/password window is by trying to access this page with out pressing this enter button. the fact that some of the more savy users may see the username and passwords is not important.
So in a nut shell...I want to password protect a folder and and include a username and password in a submit or enter button.
No back door entry
Thanks
Greg
GregX
04-26-2001, 01:02 AM
The situation you are encountering seems conceptually similair to the block remote loading thread ( http://support.hostrocket.com/showthread.php?threadid=1904 ).
You might try adding a .htaccess file to your /live folder with the following conditionals:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/.*$ [NC]
RewriteRule .*\.htm$ - [G]
Unless I am mistaken, that will not allow someone to load your board unless they are directed from somewhere else on your domain (granted this doesn't mean they came from the main page, but it does mean they didn't come directly to your board from an outside site). That being said, this is all hypotetical since I haven't actually tried anything along those lines and as always, YMMV
fredbear
04-26-2001, 01:14 AM
Thank you I will try that.
Greg
fredbear
04-26-2001, 06:06 PM
this did not work... I created a new discussion page to try it, www.fredbear.com/stuff
But it did not work.
Are there any scripts that prevent back door access?
Thanks
Greg
GregX
04-26-2001, 08:29 PM
Just fooled around with it on my account and found that this is the .htaccess you need:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/.*$ [NC]
RewriteRule .*\.htm$ - [G]
(you might have to change .htm to .html if you use that as your extension)
Appearently that first line(RewriteCond %{HTTP_REFERER} !^$ ) that I quoted earlier caused it not to work, but when I tested this out, it would only allow access from another page on my domain that linked to it. If I try to directly access that page, I get a 410 error now.
fredbear
04-26-2001, 10:19 PM
That worked to a point... the problem is when sombody replys to a post or "submits a new post they get blocked out because the referring page is not www.fredbear.com
This discussion page is created with Frontpage 2000 and it has it's own .htaccess file............
# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.fredbear.com
AuthUserFile /home/fredbear/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/fredbear/public_html/_vti_pvt/service.grp
This is the actual content of the .htaccess file
Can I just modify this file (with your help) or can the edit the other code to work everywhere as long you are in www.fredbear.com
I hope I explained the well enough
Thanks
Greg
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.