By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,537 Members | 1,750 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,537 IT Pros & Developers. It's quick & easy.

Setting a Varing Directory Structure for Static Utility Files

P: 14
Thanks to Markus for pointing me to all the Apache stuff
http://bytes.com/topic/html-css/answ...-site-template

My Web site is hosted on a shared Linux hosting, that runs the Apache 2.2

I got multiple static "utility" files: CSS, JavaScripts, Impages, etc. In order to maintain a coherent and consistent structure, I put all these kind of utility files in one directory hierarchy. However, this directory structure might change in the future.

What I want is to put this directory location, perhaps as an absolute path, starting from the root, in an (environment) "variable", for instance, UTILITYD. If this directory ever changed, then UTILITYD changes accordingly,
Expand|Select|Wrap|Line Numbers
  1. export UTILITYD=$HOME/utility
Another choice might be to set UTILITYD to the actual HTTP URL, e.g.
Expand|Select|Wrap|Line Numbers
  1. export UTILITYD=http://www.example.com/utility
I'm not even sure if this can be done using SSI
Expand|Select|Wrap|Line Numbers
  1. <!--#set var="utility" value="some_form_of_the_directory" -->
Since this would end up again into changing each HTML page into the new directory path that holds the utility files.

Issues: UTILITYD should be accessed via the Apache environment; this can be achieved via the Apache SetEnv or PassEnv directives. But this requires two things, according to the Apache docs
  1. access to the Apache configuration file
  2. restarting the Apache server.

My host doesn't allow the former, how about the latter. Even I'm not quit sure if any host allows restarting its own Apache.

Is there any suggestions of how this can be resolved or even using any of the SSI techniques or what else?
Dec 4 '09 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.