OK,
I have a 3 web servers behind a load balancer and I am working on a solution to serve HTML versions of dynamic pages if the files exist. Because of the clustered environment I have created these on the SAN and referenced them as virtual directories.
This is where the problem begins, I don't want to hard code the path as I want this code to work on my dev, staging and UAT boxes as well as in production and it appears that to use RewriteCond with the -f flag it requires the full qualified path and not the URL. There is obviously the %{DOCUMENT_ROOT} variable that can dynamically find the path to the web root, but is there a way to get the path to a virtual directory?
The other option I investigated was setting the server path as an environment variable in httpd.conf so it is server wide. I used SetEnv for this but it does not seem to be accessible from the .htaccess file which is where my rewrites are. I am really stumped and would appreciate some help.
Regards,
Simon