View Full Version : I need help to resolve .htaccess issue.
Justin
04-07-2012, 11:55 PM
I have a couple of add-on domains in my hosting account (main account - mexabet.com). Now one add-on domain (mexabet.biz) can be accessed as a folder (directory) of other add-on domains, which isn't appropriate. For example, http://www.mexabet.biz/ can also be be accessed via the following:
http://mail.zestle.com/mexabet.biz/
http://mail.zinsolar.biz/mexabet.biz/
http://mail.zinsolar.com/mexabet.biz/
http://mail.zinsolar.info/mexabet.biz/
http://mail.zinsolar.net/mexabet.biz/
http://mail.zinsolar.org/mexabet.biz/
http://mail.devzeal.com/mexabet.biz/
http://mail.mexasoft.com/mexabet.biz/
I really don't know why this is happening. I only installed an email client called "mail" in public_html/mail.
I've had a live chat with BH support, but their suggestion didn't work, which was to add the following code to the .htaccess file of mexabet.biz:
RewriteCond %{HTTP_HOST} ^subdomain.primarydomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.subdomain.primarydomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^addondomain.com$
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ http://www.addondomain.com/ [R=301,L]
I did this, but it didn't work:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mexabet.biz.mexabet.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.mexabet.biz.mexabet.com$ [OR]
RewriteCond %{HTTP_HOST} ^mexabet.biz$
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ http://www.mexabet.biz/ [R=301,L]
Any help will be much appreciated.
navsguardar
04-08-2012, 10:33 PM
Justin,
I am no great expert on .htaccess, but maybe if you can share the .htaccess file of your main folder & that of mail folder, something can be tracked.
Till then look at the following solutions:
1) Check into your cpanel & advanced DNS files. Possibly there may be an entry where this addon path points to the megabet.biz directory.
2) While we figure out the problem, please use rel=canonical tag in your original site pages pointing to themselves to avoid duplicate content penalty as all your addon domains are being indexed by google.
Justin
04-08-2012, 11:13 PM
Thanks for your time and reply. The following is the response I got from Bluehost Support yesterday:
Thank you for contacting Bluehost support. That is expected. We have a mail subdomain installed to help rout your email. It is set up on the webserver to display the content of your ~/public_html/ folder. That means that http://mail.zestle.com/mexabet.biz/ will use the ~/public_html/mexabet.biz/ folder. If you want to redirect the traffic, your .htaccess rule wasn't set up correctly. You can use these settings to get it up and running. "subdomain": mail you have many examples of "primarydomain.com" zestle.com, zinsolar.biz, zinsolar.info, devzeal.com, mexasoft.com
After reading the BH Support message, I placed the following code in the .htaccess of zinsolar.com, but it didn't work:
RewriteCond %{HTTP_HOST} ^mail.zinsolar.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.mail.zinsolar.com$ [OR]
RewriteCond %{HTTP_HOST} ^mexabet.biz$
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ http://www.mexabet.biz/ [R=301,L]
Then, I put the code in the .htaccess file of mexabet.biz, but it still didn't work. Even with the code in place in .htaccess, I was still able to access mexabet.biz via http://mail.zinsolar.com/mexabet.biz/. So, I removed the code from the server. Now what should I do? I need an example code to put in the .htaccess file and I need to know which domain I should add the code to its .htaccess file.
Justin,
I am no great expert on .htaccess, but maybe if you can share the .htaccess file of your main folder & that of mail folder, something can be tracked.
Till then look at the following solutions:
1) Check into your cpanel & advanced DNS files. Possibly there may be an entry where this addon path points to the megabet.biz directory.
2) While we figure out the problem, please use rel=canonical tag in your original site pages pointing to themselves to avoid duplicate content penalty as all your addon domains are being indexed by google.
navsguardar
04-08-2012, 11:54 PM
Try this in the .htaccess file of the directory mail.zinsolar.com :
Redirect 301 /mexabet.biz/ http://www.mexabet.biz/
But what is surprising is that your other domains like zestle.info inside
http://mail.zinsolar.biz/zestle.info/ is reaching its own directory & not showing content from zestle.info which actually redirects to zestle.com. You may find a clue somewhere here if the above .htaccess code doesnt work. I have a strong feeling that something is misconfigured in cpanel/DNS settings. Otherwise this problem would have occurred on other domains too.
Justin
04-09-2012, 12:54 AM
The strangest thing there is that there's no directory called mail.zinsolar.com, etc, in the File manager. I've checked the Home Directory and Web Root (public_html/WWW) - showing hidden files very carefully, but I couldn't see anything that reference them. When I check "Redirects" to see if I can find such sub-domain called mail, nothing comes up.
The email client I installed in public_html is called "mail", but that is not causing the issue. I think BlueHost hides these "mail" sub-domains from view. And there response is taking ages. Very frustrating indeed!
Please, can you edit your last post and unlink http://mail.zinsolar.biz/zestle.info/, to avoid causing more SEO issue?
Try this in the .htaccess file of the directory mail.zinsolar.com :
But what is surprising is that your other domains like zestle.info inside http://mail.zinsolar.biz/zestle.info/ is reaching its own directory & not showing content from zestle.info which actually redirects to zestle.com. You may find a clue somewhere here if the above .htaccess code doesnt work. I have a strong feeling that something is misconfigured in cpanel/DNS settings. Otherwise this problem would have occurred on other domains too.
navsguardar
04-09-2012, 01:13 AM
Just one last quick fix. Try creating the non existent mail folder (if it allows you to & in case you haven't tried this already). Else lets wait for the support or someone else in the forum to pitch in. All the Best ...
Justin
04-09-2012, 01:55 AM
I don't think it's appropriate to create a mail folder under each add-on domain, when it already exists somewhere, except that I can't see it from my cPanel account.
I learnt about this issue from Google Webmaster Tools. It's strange that Bluehost would create a mail sub-domain for each add-on domain and not make sure it doesn't cause SEO issue for clients. I'm hoping they fix it quickly or someone knowledgeable about the issue comes along. I now bear the brunt of something I didn't cause.
Just one last quick fix. Try creating the non existent mail folder (if it allows you to & in case you haven't tried this already). Else lets wait for the support or someone else in the forum to pitch in. All the Best ...
Justin
04-14-2012, 03:21 AM
I've managed to successfully redirect mail.zestle.com to http://www.zestle.com/ with the following code:
RewriteCond %{HTTP_HOST} ^mail.zestle.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.mail.zestle.com$ [OR]
RewriteCond %{HTTP_HOST} ^zestle.com$
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ http://www.zestle.com/ [R=301,L]
Now I want to redirect all directories and files inside mail.zestle.com to http://www.zestle.com/. Does anyone know how to achieve this?
Justin
04-15-2012, 04:45 AM
Bluehost Support Team has helped me to resolve this issue.
nitrocrzy
04-15-2012, 05:20 AM
Be cool if you shared how you accomplished this so others that may run into the same kind of scenario could benefit.
Justin
04-15-2012, 05:38 PM
I'll make a detailed post later.
Be cool if you shared how you accomplished this so others that may run into the same kind of scenario could benefit.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.