Hi there,
I need a rewrite rule to rewrite wildcard subdomains to domain.
ie
*.mydomain.com/test.php?ac=1 to www.mydomain.com/test.php?ac=1
*.mydomain.com/* to www.mydomain.com/*
except
gallery.mydomain/* to gallery.mydomain/*
I want to keep the current request but rewrite subdomain to domain.
i added virtual host to my httpd.conf
<VirtualHost *>
ServerName gallery.mydomain.com
DocumentRoot /var/www/www.mydomain.com/gallery
ErrorLog /var/www/www.mydomain.com/logs/error.log
TransferLog /var/www/www.mydomain.com/logs/access.log
DirectoryIndex index.htm index.html index.php index.phtml
Include /etc/apache2/error.conf
</VirtualHost>
<VirtualHost *>
ServerName *.mydomain.com
ServerAlias *.mydomain.com www.mydomain.com mydomain.com
DocumentRoot /var/www/www.mydomain.com
DirectoryIndex index.htm index.html index.php index.phtml
ErrorLog /var/www/www.mydomain.com/logs/error.log
TransferLog /var/www/www.mydomain.com/logs/access.log
Include /etc/apache2/error.conf
</VirtualHost>