httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adi Linden <a...@adis.on.ca>
Subject Re: AW: [users@httpd] VirtualHost and Memory Consumption
Date Tue, 20 Jan 2004 19:25:20 GMT
On Tue, 20 Jan 2004, Robert Andersson wrote:
> I tweaked it for your situation, and so might be broken. It would either
> redirect a.b.c to www.a.b.c or www.a.b.c to a.b.c. I think this is good
> strategy, as you don't have more than one name for a site.

Thank you for all the suggestions. This is what I cooked up and tested, a 
combination of what I read in the apache docs and learned here.

  # Bulk rewriting for users virtual hosts
  RewriteEngine On

  # Do some useful logging (optional)
  #RewriteLog /var/log/httpd/rewrite_log
  RewriteLogLevel 0

  RewriteMap   lowercase  int:tolower

  RewriteCond  %{REQUEST_URI}                !^/icons/
  RewriteCond  ${lowercase:%{SERVER_NAME}}   !^www\.sample\.org$
  RewriteCond  ${lowercase:%{SERVER_NAME}}   ^([0-9a-z-]+)\.sample\.org$ [OR]
  RewriteCond  ${lowercase:%{SERVER_NAME}}   ^www\.([0-9a-z-]+)\.sample\.org$
  RewriteRule  ^(.+)                         /home/%1/public_html/$1

Thanks,
Adi


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message