SetEnvIf Alternative

ne07

New Member
#1
Need assistance with rewrite rule alternative for SetEnvIf directive
Code:
SetEnvIf Host ^.? site_host=default
SetEnvIf Host ^(.+) site_host=$1
SetEnvIf X-Forwarded-Host ^(.+) site_host=$1
something similar to :
https://store.litespeedtech.com/store/knowledgebase.php?action=displayarticle&id=90
https://www.litespeedtech.com/support/forum/threads/solved-setenvif-alternative.6304/

Above rewrite rules work perfectly on the Apache system, please guide us how to implement the same on the LS system. Thanks!
 

NiteWave

Administrator
#2
RewriteCond %{HTTP_HOST} ^(.?)$
ReriteRule .* [E=site_host:default]

RewriteCond %{HTTP_HOST} ^(.+)$
ReriteRule .* [E=site_host:%1]

RewriteCond %{HTTP:X-Forwarded-Host} ^(.+)$
ReriteRule .* [E=site_host:%1]
 
Top