after trying several ways to limit the request rate to scripts i came up with this config which does not work:
19 <If "%{PATH_INFO}="~" \.(php|pl|cgi|py)="" "="">
20 SetEnv PH_QS_Script 1
21 </If>
22 <If "%{REQUEST_FILENAME}="~" \.(php|pl|cgi|py)="" "="">
23 SetEnv PH_QS_Script 1
24 </If>
25
26 QS_ClientEventLimitCount 20 30 PH_QS_Script
But it does nothing.
Both values stay 0:
PH_QS_Script_Remaining 0
PH_QS_Script_Counter 0
But PH_QS_Script is set to 1.
What's wrong here?
Thanks!
Greets,
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
after trying several ways to limit the request rate to scripts i came up with this config which does not work:
19 <If "%{PATH_INFO}="~" \.(php|pl|cgi|py)="" "="">
20 SetEnv PH_QS_Script 1
21 </If>
22 <If "%{REQUEST_FILENAME}="~" \.(php|pl|cgi|py)="" "="">
23 SetEnv PH_QS_Script 1
24 </If>
25
26 QS_ClientEventLimitCount 20 30 PH_QS_Script
But it does nothing.
Both values stay 0:
PH_QS_Script_Remaining 0
PH_QS_Script_Counter 0
But PH_QS_Script is set to 1.
What's wrong here?
Thanks!
Greets,
Stefan
I would just use the SetEnvIf directive (IMHO, this makes the configuration simpler)