FRIHOSTFORUMSSEARCHFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Htaccess question: hiding cpanel subdomains

 


inphurno
over here on frihost I use DirectAdmin so I never used the cpanel interface before. i was helping a friend to move his site to a new hosting provider and i noticed that when you create an addon domain in the cpanel you also create a subdomain on the main domain of the hosting.

i contacted his tech support and they told me that's how cpanel works and that i could use rewrite rules to fix the problem. i found this really annoying since i figure there would be seo problems if you have 2 addresses with the same content. i read a bit on the net and i came up with this solution to remove the 2 urls created by the subdomain made by cpanel (2ndDomain.1stDomain.com and 1stDomain.com/2ndDomain.com):

RewriteCond %{HTTP_HOST} ^(www.)?2ndDomain.1stDomain.com [NC]
RewriteRule ^(.*)$ http://www.1stDomain.com/ [L,R=301]

RewriteCond %{HTTP_HOST} ^(www\.)?1stDomain\.com$
RewriteRule ^2ndDomain.com/(.*) http://www.1stDomain.com/ [R=301,L]

I'm guessing there must be other people ot there that have had this problem so let me know if this solution makes sense or what you did to fix this problem. thanks in advance!
inphurno
I'm sure I'm not the only person here who has or takes care of hosting elsewhere then frihost. so i'm wonder has no one ever run into this problem before?

from what i can tell cPanel hosting is pretty common but no one ever try to setup more than one domain with this type of web admin interface? Please guys and gals any help with this would really great for our non-profit org so that we can figure out what to do for our hosting.
Related topics

htaccess question...
Htaccess Question
.htaccess question
Can't login
PHP that creates subdomain, ftp account, and mysql database?

Quick Cpanel Question
Direct admin question - Pointing domains to subdomains.
.htaccess tutorial
Features of FRIHOST
A Question For .htaccess

Must cpanel be 2082? I can't connect
Cpanel Question. Very serious.
How to access CPanel/DirectAdmin from behind a firewall
Cpanel Acess... again!
Subdomains on my old subdomain still exist.. ?!
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.