.htaccess Forward all mail subdomains to /webmail/
.htaccess Forward all mail subdomains to /webmail/ -
Solution :
Additionally, if you would like to do some further testing, give the htaccess tester tool a try. It allows you to specify a certain URL as well as the rules you would like to include and then shows which rules were tested, which ones met the criteria, and which ones were executed.
.htaccess files are extremely useful in many cases for users who either do not have root permissions or for users who simply aren't comfortable in making changes in their web server's configuration file. Trying to debug .htaccess not working isn't always the easiest thing to do, however, hopefully by checking the discuss below mentioned about htaccess, subdomain, directory, , .htaccess common problems as well as the troubleshooting tips, you'll have a better grasp on what you may have to modify to get your .htaccess file running smoothly.Problem :I would like to write a .htaccess rewrite command that takes any url with a subdomain mail and forwards them to whatever domain included that subdomain with /webmail at the end.
e.g.
mail.zane.com would forward to zane.com/webmail
mail.prowebmasters.com would forward to prowebmasters.com/webmail.
In short, I have a master domain with my host with addon domains in folders on the master domain. Any time I type mail.site.com it is forwarding to the index.html of the master site. Instead of doing that I want the sites to open /webmail/ of the site.
This will work but you'll have to copy the rewrite into each domains .htaccess file.
RewriteCond %HTTP_HOST ^mail.domain.com$
RewriteCond %REQUEST_URI !^/webmail/
RewriteRule (.*) /webmail/$1
Comments
Post a Comment