Email Questions  
     

Left Nav Register Home Forum Email Directory Email Marketing Search Today's Posts Mark Forums Read Right Nav

Left Container Right Container
 

Go Back   Email Questions » General Forums » General


General This forum is for both technical and non-technical discussions that do not belong in another EQ forum.

cPanel Addon Domains and Mod_Rewrite

General


Reply
 
LinkBack Thread Tools Display Modes
Old Monday, December 6th, 2010   #1
E-Mail Expert
 
Big Dan's Avatar
 
Join Date: Aug 2008
Location: New York
Posts: 465
Thanks: 343
Thanked 146 Times in 140 Posts
Default cPanel Addon Domains and Mod_Rewrite

By default when you create an addon domain in cPanel it places the sites files under /home/user/public_html/domain.com.

cPanel Addon Domains and Mod_Rewrite-cpanel-add-domain-default.jpg

This isn't a problem when your serving static sites. However /home/user/public_html is the path for serving the primary domain. If you're running something like Wordpress with 'pretty permalinks' on the primary domain mod_rewrite in the parent directory (public_html) messes with subfolders (your secondary domain) and results in errors. Most common is you will see the secondary domain's URLs rewritten to primarydomain.com/secondarydomain.com/path/to/file.html which results in a 500 internal server error.

The easiest fix is to define the addon domain's path as /home/user/domain.com. This is easily done via the addon domains screen, simply remove public_html/ from the path.

cPanel Addon Domains and Mod_Rewrite-cpanel-add-domain-fixed.jpg

I wrestled with this quite a bit in my early days of multi-siting on one cPanel account. Even going so far as to buy a domain to use as nothing more than my primary domain (a place holder). At the time none of the hosts seemed to know what was going on. Later on as a played more and more with Apache I figured out the problem on my own and have been using the /home/domain.com solution with no issues for quite a while.

I hope this explanation and tutorial saves someone all the frustration I had.
__________________

Big Dan | @DanHutter

Last edited by Big Dan; Tuesday, May 3rd, 2011 at 01:30 PM. Reason: typo
Big Dan is offline   Reply With Quote


1 members found this post helpful.
The Following 2 Users Say Thank You to Big Dan For This Useful Post:
jadae (Monday, September 26th, 2011), popowich (Monday, December 6th, 2010)



Old Monday, September 26th, 2011   #2
New Email
 
Join Date: Sep 2011
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
Default Re: cPanel Addon Domains and Mod_Rewrite

This seems to work only with static .html pages.
I had 2 addon domains and i did the same with both the sites.
The result was interesting.
One domain worked fine since it had "index.html". the other domain having "index.php" still showed Internal Server error.
Seems the problem lies in running scripts.
Any ideas on how to solve this one
jadae is offline   Reply With Quote


Reply

Thread Tools
Display Modes


LinkBacks (?)
LinkBack to this Thread: http://www.emailquestions.com/general/2802-cpanel-addon-domains-mod_rewrite.html
Posted By For Type Date Hits
cPanel Addon Domains and Mod_Rewrite Problems This thread Pingback Monday, December 6th, 2010 10:15 AM 39

Similar Threads
Thread Thread Starter Forum Replies Last Post
SPF for domains that do not send email popowich ISP and Free Email Support Forums 0 Thursday, October 21st, 2010 10:14 PM
cpanel email problem - 110 Can't open SMTP stream ebykwee Mail Server Support 2 Tuesday, January 6th, 2009 12:49 AM
AOL personalized email domains popowich AOL 0 Sunday, December 28th, 2008 08:29 PM
WHM/cPanel: Default to blackhole Big Dan Mail Server Support 2 Wednesday, November 19th, 2008 08:46 PM



All times are GMT -4. The time now is 05:45 AM.


Powered by vBulletin
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd. SEO by vBSEO