Hi,I've been bashing my head against the wall with this problem for a while now and apart from a headache haven't really got anywhere.
I currently have Apache (2.0.54 but I've tried 2.0.55), built from source, running as an accelerator to several backends. Without getting too deep into how I'll be using it, I'm essentially trying to do:
SetEnv PROTO http RewriteRule ^/example(.*)$ %{ENV:PROTO}://%{SERVER_NAME}/example$1 [P,L]Although the docs seem to say it's possible to use Apache environment variables within a RewriteRule I'm not having much luck. The mod_rewrite doc states:
There is the special format: %{ENV:variable} where variable can be any environment variable. This is looked-up via internal Apache structures and (if not found there) via getenv() from the Apache server process.
SERVER_NAME gets substituted as expected although the environment variable doesn't.
I see a request of: GET /://server.example.co.uk/example/ HTTP/1.1 going to the backend server!If anyone's got any suggestions I'd be glad to give them a go. At present I have a make file generating http and https variants from a template which I'd rather get away from - I usually forget to run make!
Many thanks in advance, Neil. -- Neil Hillard hillardn@xxxxxxxxx Westland Helicopters Ltd. http://www.whl.co.uk/ Disclaimer: This message does not necessarily reflect the views of Westland Helicopters Ltd. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx