Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
<VirtualHost _default_:8080>
  RewriteEngine on

  # Remove "www." from domain names by redirecting.
  RewriteCond %{HTTP_HOST} ^www\.
  RewriteRule ^(.*) %{HTTP_HOST}`$1  [C]
  RewriteRule ^www\.([^\_]*)\`(.*)$ http://$1$2 [R=301,L]

  # Use components of the domain to determine the document root.
  # %0 is the whole domain.
  # %1 is the first part (using dotted delimiters).
  # %-2 is the second to last part.
  ServerAlias *.example.com
  UseCanonicalName Off
  VirtualDocumentRoot /var/www/html/workspace/%1/htdocs

  # Make this configuration compatible with Drupal and Pressflow clean URLs.
  <Directory ~ ".*">
    RewriteBase /
  </Directory>
</VirtualHost>