Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
litespeed_wiki:config:recaptcha [2019/08/14 11:44]
qtwrk
litespeed_wiki:config:recaptcha [2019/09/23 14:22]
Jackson Zhang [Advanced Configuration: Define reCAPTCHA Actions Through Rewrite Rules]
Line 55: Line 55:
  
 ===== Advanced Configuration:​ Define reCAPTCHA Actions Through Rewrite Rules ===== ===== Advanced Configuration:​ Define reCAPTCHA Actions Through Rewrite Rules =====
 +If Server System Admin would like the end-user to control/​enable reCAPTCHA through .htaccess, System Admin will need to enable reCAPTCHA from server level globally and set server sensitivity to ''​0''​ first. ​
  
-If you want to further define the reCAPTCHA action as ''​deny'' ​or ''​drop''​, you can use one of the following rewrite rule directives in control panel virtual host document root .htaccess:+''​[E=verifycaptcha]'' ​can be used to enable reCAPTCHA to override server-level ​''​0'' ​sensitivity.
  
-''​[E=verifycaptcha]''​ or ''​[E=verifycaptchaACTION]''​+For example:
  
-''​[E=verifycaptcha]'' ​will always redirect to reCAPTCHA until verified. ''​ACTION''​ can be ''​deny'' ​to return a 403 or ''​drop'' ​to drop the connection when **Max Tries** is reached. Until Max Tries is reached, the client will be redirected to reCAPTCHA.+<​code>​ 
 +<​IfModule LiteSpeed>​ 
 +RewriteCond SOME-CONDITIONAL-CHECK 
 +RewriteRule .* - [E=verifycaptcha] 
 +</​IfModule>​ 
 +</​code>​ 
 + 
 +(''​SOME-CONDITIONAL-CHECK'' ​would be a suspicious UA, IP address, etc.) 
 + 
 +The end user can even further define the reCAPTCHA action as ''​deny''​ or ''​drop'' ​in .htaccess through ''​[E=verifycaptcha:​ ACTION]''​
  
 For example: For example:
 +<​code>​
 +<​IfModule LiteSpeed>​
 +RewriteCond SOME-CONDITIONAL-CHECK
 +RewriteRule .* - [E=verifycaptcha:​ deny]
 +</​IfModule>​
 +</​code>​
  
-<​code>​RewriteCond SOME-CONDITIONAL-CHECK+or 
  
-RewriteRule .* - [E=verifycaptcha]</​code>​+<​code>​ 
 +<​IfModule LiteSpeed>​ 
 +RewriteCond SOME-CONDITIONAL-CHECK 
 +RewriteRule .* - [E=verifycaptcha: drop] 
 +</​IfModule>​ 
 +</​code>​
  
-(''​SOME-CONDITIONAL-CHECK'' ​would be a suspicious UAIP address, etc.)+**NOTE1**''​[E=verifycaptcha]'' ​will always redirect to reCAPTCHA until verified. ''​ACTION''​ can be ''​deny''​ to return ​403 or ''​drop''​ to drop the connection when **Max Tries** is reached. Until Max Tries is reachedthe client will be redirected to reCAPTCHA.
  
-**NOTE**: In most cases, rewrite rules will override the default server behavior. However, in cases where trigger sensitivity is high, visitors may be sent directly to reCAPTCHA before the rewrite rules can even be processed.+**NOTE2**: In most cases, rewrite rules will override the default server behavior. However, in cases where trigger sensitivity is high, visitors may be sent directly to reCAPTCHA before the rewrite rules can even be processed.
  
 ===== Customize the Good Bots List ===== ===== Customize the Good Bots List =====
  • Admin
  • Last modified: 2020/05/20 20:25
  • by Shivam Saluja