Eric Covener wrote:
On Wed, Apr 22, 2009 at 1:02 PM, Eric Covener <cove...@gmail.com> wrote:
RewriteRule .* http://%{SERVER_NAME}$1 [R]
RewriteRule .* http://%{SERVER_NAME}$1 [R]
I'll head Andre off -- yes you need to actually capture something to use $1
;-)
Well actually, I had pretty much accepted the negative verdict of the
Apache and mod_rewrite gurus, and the (understandable) objection of the
OP to plugin mod_perl just for that, and was think more of something
done outside of Apache (still using perl mind you), like so :
- assuming the OP is running this Apache on some nix-like box
- assuming the OP's VHost configurations are in separate conf files
located in some directory like /etc/apache2/hosts.d/*.conf, and being
included in the main httpd.conf at Apache (re)start
- assuming one could create some text file containing the canonical
hostnames and their corresponding less-desirable aliases
- one could then create another subdirectory of /etc/apache2/ such as
/etc/apache2/hosts-templates.d/ and place a prototype version of the
vhost config files there
- then by some judicious use of a (perl) script running just prior to
apachectl in /etc/init.d/apache2, one could pre-process the templates
into /etc/hosts.d/*.conf, replacing/inserting the appropriate rules
where they need to go.
- which would have the advantage of making this static as far as Apache
is concerned and avoid many run-time per-request cpu-consuming evaluations
---------------------------------------------------------------------
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-unsubscr...@httpd.apache.org
" from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org