I have a config file for apache2 virtualhosts. For each virtuahost I have a conf file which looks like this:
NameVirtualHost mydomain.co.uk:80
<VirtualHost mydomain.co.uk:80>
DocumentRoot /home/d/r/drupal/web/public_html
ServerName mydomain.co.uk
ServerAlias www.mydomain.co.uk
ErrorLog /var/log/apache2/sites/mydomain.co.uk_error-log
CustomLog /var/log/apache2/sites/mydomain.co.uk_access-log "combined"
# Rewrite the www
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.mydomain.co.uk/?$ [NC]
RewriteRule ^(.*)$ http://mydomain.co.uk$1 [L,R=301]
# Read in the drupal configuration
Include conf.d/drupal6.conf
# Block access while developing
# Include conf.d/beta.conf
</VirtualHost>
How can I specify myDomain in a single place and re-use this string. i.e.
mydomain = "www.SomeDomainIHave.com"
The idea being that I specify the domain one at the top of the file so to avoid any mistakes further down.
Hope this makes sense.
Thanks.