LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    
Portal HomeClient AreaAnnouncementsKnowledgebaseSupport Tickets

Knowledgebase
You are here: Portal Home > Knowledgebase > Features/Configurations > Special Environment Variables in LiteSpeed Rewrite Rule

Special Environment Variables in LiteSpeed Rewrite Rule

Special Environment that can be used in rewrite rule to control features 

dontlog
skip access logging once set, value does not matter, example: 
RewriteRule \.gif - [E=dontlog:1]

nokeepalive
Close client connection after finish this request, value does not matter, example: 
RewriteRule .* - [E=nokeepalive:1]

no-gzip
Do not use gzip compression for this request, must be none-zero to set, example 
RewriteRule \.css - [E=no-gzip:1]

no-gzip:0 has no effect.

Proxy-Host
Modify proxy request "Host" header value, example: 
web site domain name is "www.example.com", it proxy request to backend, backend is defined as a web server with name "node1", it requires domain name to be "www.example.com", the rewrite rule should be 
RewriteRule ^(.*)$ http://node1/$1 [P,E=Proxy-Host:www.example.com]


cache-ctrl
/cache-control
Modify lsws page cache policy 
enable cache 
Rewriterule ^/special_cachable_url$ - [E=Cache-ctrl:max-ages=30]
Rewriterule ^/non-cacheable-url$ - [E=Cache-control:no-cache]

No abort
This flag prevents external app process from being killed by lsws as a runaway process while it is in the middle of processing. 
RewriteRule  ^script_url$ - [E=noabort:1]

 



Was this answer helpful?

Add to Favourites
Print this Article

Also Read


© Copyright 2003-2012 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.