D
denka
Guest
Hello
I have problems with a subdomain redirection to the domain httpdocs directory.
ie
URL sub1.domain.com
PATH ...httpd/vhosts/domain.com/subdomains/sub1/httpdocs/
to
URL sub1.domain.com
PATH ...httpd/vhosts/domain.com/httpdocs/
I have found the idea on this forum and make the vhost.conf in the directory ...httpd/vhosts/domain.com/conf/ within (I have changed the code a little)
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteMap lowercase int:tolower
ServerAlias *.domain.com
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain.com$
RewriteCond %{HTTP_HOST} !^webmail\.domain.com$
RewriteCond %{HTTP_HOST} ^[^.]+\.domain.com$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^([^.]+)\.domain.com(.*) /home/httpd/vhosts/domain.com/httpdocs/$2
</IfModule>
And it works great!
But I've got the problem
All subdomains redirect to the ...httpd/vhosts/domain.com/httpdocs/
I want the subdomain webmail to be not redirected like another subdomains...
Any ideas? Help me please.
Many thanks.
I have problems with a subdomain redirection to the domain httpdocs directory.
ie
URL sub1.domain.com
PATH ...httpd/vhosts/domain.com/subdomains/sub1/httpdocs/
to
URL sub1.domain.com
PATH ...httpd/vhosts/domain.com/httpdocs/
I have found the idea on this forum and make the vhost.conf in the directory ...httpd/vhosts/domain.com/conf/ within (I have changed the code a little)
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteMap lowercase int:tolower
ServerAlias *.domain.com
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain.com$
RewriteCond %{HTTP_HOST} !^webmail\.domain.com$
RewriteCond %{HTTP_HOST} ^[^.]+\.domain.com$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^([^.]+)\.domain.com(.*) /home/httpd/vhosts/domain.com/httpdocs/$2
</IfModule>
And it works great!
But I've got the problem
All subdomains redirect to the ...httpd/vhosts/domain.com/httpdocs/
I want the subdomain webmail to be not redirected like another subdomains...
Any ideas? Help me please.
Many thanks.