I am having an issue on a shared host passing an environment variable to a cgi script. To test the behaviour I have written a cgi script that just outputs its environment variables. The relevant rewrite rule in the .htaccess file is: RewriteRule ^test_env$ env.cgi [E=TEST:test_value] I have the same script/.htaccess setup locally (apache 2.2.4) and remotely (apache 1.3.37). When accessing /test_env locally this creates the env REDIRECT_TEST="test_value" as expected. Remotely there is no extra env value set. Here is a minimal .htaccess that produces the behaviour: AddHandler cgi-script .cgi Options +FollowSymLinks +ExecCGI RewriteEngine On RewriteRule ^test_env$ env.cgi [E=TEST:test_value] I'm at a loss to figure out where to look from here on and what I can tell my provider so this can be resolved. Any pointers welcome. - Adding the PT flag does not help, but should not make a difference since it is the final rule - Using env= instead of E= does not make a difference