Quote:
Originally Posted by sundialsvcs
I want to replace the use of ".htaccess" files with equivalent directives that are "Include"d directly into the configuration file ... with no overrides allowed. (htaccess is evil ...)
I am able to do this if I "Include" the file in each one of (several hundred ...) <VirtualHost> entries.
But I would like to include the file just once, and then use "RewriteOptions Inherit" to virtually-insert it at each spot. But the interpretation of the rules does not seem to be the same. (For instance, there is a "/" prepended to the URI string.)
The original "Include" is in the base config-file, outside of any VirtualHost.
Also, it is necessary (don't ask ... :rolleyes) for each VirtualHost to have its own RewriteMap. Therefore, the rules, when applied in any host, must reference the maps defined in that host's entry.
Can it be done?
|
=====================================
I removed the font games directives to make reading the question easier.
VirtualHost(s) implies the potential for multiple OS's which can mean lots of NON-Linux commands running around inside any given machine.
IF the program reading the "outside" base commands can be directed there with a simple:
ln -s with_the_pointed_to_file the_pointer_to_file
you should be able to do as you are wanting. ... ln -s is SOFT-LINK (see man ln)
The link softlinked to item can be a file or directory or program...
Place the base commands in ... well whatever you want to call it ... and place the sys-wide stuff there. Put selective overrides in the chain of softlinks for the specific VirtualHost(s) to use. Each VHost can have it's specific overrides over ride where necessary and even groups of VHosts can be routed through the sane group specific overrides.
Kinda like building a pyramid with the "BASE" at the top and the groups/singles at the bottom. The adds/removes/changes occur in the routing back to the BASE. This works on paper, but I don't have enough machines to do a real test. I am also assuming that the VM setup/control software is Linux. If you are using VAX or DEC or WINDOW$ you are on your own.
I ran a short test using ln -s xx cc and the logic does work. Whether or not it works with the programs you are using is still up for grabs. xx and cc are just names for showing the syntax. xx is a target for program cc which executes commands and then calls the next layer and that does things and calls..... Again - a kind of Pyramid with the flow of actions proceeding upward rather than down. cc can be the same name (and even with the same instructions/configure tokens) in each directory back up the line.
Norseman01