Web Hosting Talk







View Full Version : Htaccess and a form


FireFoz
08-11-2002, 10:04 PM
Hi

im trying to put up a small form (a poll) on a secured area on my server. The area is secured by an .htaccess file:

------------------------------------
deny from all
allow from 192.164.134.2

AuthUserFile /home/sites/site7/.htpasswd

AuthGroupFile /dev/null
AuthName 'Authentification Required'
AuthPAM_Enabled off
AuthType Basic
<Limit GET>
require valid-user
</Limit>

<Files .*>
order allow,deny
deny from all
</Files>
satisfy any
---------------------------------

now when i use the form, it says forbidden (403), but when i remove the .htaccess file (so its unprotected) its works fine :confused:

does anybody know what i can do? Im sure the form (html) code is correct... i made thousands of forms already but here:

<form name="poll" method="POST" action="index.php">

so it works fine without the .htaccess file, but with the file it doesnt work.. but when i put up the .htaccess file and try it, it doesnt even ask for authorization either, it just shows 403

The Prohacker
08-11-2002, 10:16 PM
Well your limiting the script to only use get.. And your form uses post..

davidb
08-11-2002, 11:14 PM
Assuming that this is anything like cisco access lists, I would have to say that it runs in order from top to bottom. So it runs deny all first, so it dosent even check the allowed. try switching the spots and giving it another go.

FireFoz
08-12-2002, 07:17 AM
Originally posted by The Prohacker
Well your limiting the script to only use get.. And your form uses post..

That was it, i change <LIMIT GET> to <LIMIT POST GET> and it worked :D

i feel pretty stupid now :p

tnx