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
Previous revision
litespeed_wiki:config:recaptcha [2019/09/23 14:22]
Jackson Zhang [Advanced Configuration: Define reCAPTCHA Actions Through Rewrite Rules]
litespeed_wiki:config:recaptcha [2020/05/20 20:25] (current)
Shivam Saluja Remove space from RewriteRule
Line 54: Line 54:
  
  
-===== Advanced ConfigurationDefine ​reCAPTCHA Actions Through Rewrite Rules =====+===== Set "​Trusted <​ip>"​ in .htaccess to bypass reCAPTCHA check ==== 
 + 
 +Since LSWS 5.4RC1, LSWS added virtual host trusted IP support, where you use ''​Trusted 1.2.3.4, 5.6.7.8''​ for IPv4 or ''​Trusted [2001:db8:​85a3:​8d3:​1319:​8a2e:​370:​7348]''​ for IPv6 in Virtual Host document root .htaccess to bypass reCAPTCHA, it also unblock blocked IP and make that IP trusted for that vhost. 
 + 
 + 
 +===== End-user can define ​reCAPTCHA Actions Through Rewrite Rules in .htaccess ​=====
 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 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. ​
  
Line 70: Line 75:
 (''​SOME-CONDITIONAL-CHECK''​ would be a suspicious UA, IP address, etc.) (''​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]''​+The end user can even further define the reCAPTCHA action as ''​deny''​ or ''​drop''​ in .htaccess through ''​[E=verifycaptcha:​ACTION]''​
  
 For example: For example:
Line 76: Line 81:
 <​IfModule LiteSpeed>​ <​IfModule LiteSpeed>​
 RewriteCond SOME-CONDITIONAL-CHECK RewriteCond SOME-CONDITIONAL-CHECK
-RewriteRule .* - [E=verifycaptcha:​ deny]+RewriteRule .* - [E=verifycaptcha:​deny]
 </​IfModule>​ </​IfModule>​
 </​code>​ </​code>​
Line 85: Line 90:
 <​IfModule LiteSpeed>​ <​IfModule LiteSpeed>​
 RewriteCond SOME-CONDITIONAL-CHECK RewriteCond SOME-CONDITIONAL-CHECK
-RewriteRule .* - [E=verifycaptcha:​ drop]+RewriteRule .* - [E=verifycaptcha:​drop]
 </​IfModule>​ </​IfModule>​
 </​code>​ </​code>​
  • Admin
  • Last modified: 2019/09/23 14:22
  • by Jackson Zhang