1

First: I would consider myself an advanced beginner in terms of administration. I know enough to be dangerous to myself and my projects :)

I have an addon website hosted at HostGator. The HostGator server basically treats addons like subdomains, but presents them publicly as separate websites.

I installed Joomla! 3 in a folder in the addon domain's directory. I did this automatically using QuickInstall.

After building the Joomla! site, I changed the addon domain's directory root to point to the Joomla! folder, so: public_html/addonwebsite.com now points to addonwebsite.com/joomla

I can see the new site home page (Joomla site home page) when I go to addonwebsite.com, but none of the other Joomla site pages work. Also, I can no longer access the Admin panel.

Any thoughts on what's causing this and how to rectify would be appreciated.

  • did you change the htaccess.txt file in your joomla folder to .htaccess (add the dot in front, remove the suffix)? If so, you MIGHT need to change the rewrite base by removing the # in front of it. – Brian Peat Dec 4 '15 at 14:16
  • The . in the htaccess is a typo on my part :/ – T Bone Dec 4 '15 at 16:41
  • @Brian - Thanks for replying! The . above in the htaccess is a typo on my part :/ The rewrite for the main domain root folder works fine. It's figuring out how to get Joomla to work correctly when I change the addon domain's root directory that is giving me fits. It breaks Joomla, even though the actual path doesn't change. I changed the directory using cpanel but am wondering if it needs to be done in htaccess. If so, I need help with the code! – T Bone Dec 4 '15 at 16:49
  • google my name and contact me (ignore the photos, the first result should be my site), I might be able to help you sort it out. Without seeing it up close, it's hard to troubleshoot. – Brian Peat Dec 4 '15 at 18:21
  • @Brian - I've got some server status alerts that I'm trying to rectify with HostGator before I continue with this issue. The error log is empty, so I'm wondering if the 500 error is because of a glitch in the server. Thanks for the help and will update soon. – T Bone Dec 5 '15 at 15:30
1

The preceding period to the htaccess name is NOT a typo like you believe - that is how it should be - the complete file name SHOULD BE:

.htaccess

If you have "htaccess" then that is the reason that internal links are not being rewritten back to being processed with index.php as the "htaccess" file is never used by apache - apache looks for and parses a ".htaccess"

1

A couple things to do:

  • In Joomla Global Configuration disable SEF URLs and URL Rewrite - then see if you can access all of your site pages.
  • If they do work, then enable first the SEF URLs and see again if the pages still work.
  • If they do, enable URL Rewrite and rename the htaccess.txt file that shipped with Joomla, to .htaccess and see again if they still work.

If in the last step they don't, then it's likely that something is wrong in your .htaccess. In this case, make sure that the htaccess file is indeed the one that came with Joomla and not a htaccess file that cPanel created to handle the document root for your addon domain.

You can ask your hosting provider for some help with these, or come back and give us more details about your configuration and the contents of the htaccess file.

0

There is no problem with changing the directory in Cpanel as long as the corresponding change is made in the configuration.php file and possibly in your root directory .htaccess file as well.

So check public $live_site = ''; in your configuration.php since whatever is between the two single quotes '' determines your base hostname.

It also depends on how Hostgator is handling the addon domain subdirectory, but it's likely that this is being handled by the hosts file at server level so probably shouldn't be the issue.

As a test, you can disable SEF URLs and see if it works for all subpages. If so it very well be your .htaccess file setup. In which case try adding/removing the # in front of Options +FollowSymlinks and RewriteBase /

If you can't solve it from this, then post the contents of the public $live_site = ''; line and any related setup info in your .htaccess file, plus any settings related to the hostname and directory setup in your Hostgator control panel.

  • Garth and @FFrewin. Thanks for all of the tips and support! Having to split my response due to character limits. Sorry for the ugly pagination. Part 1: Here's what I have: In the config.php file, public $live_site = ''; is blank. -- The Joomla .htaccess is the Joomla one. --There are no custom redirects in this .htaccess file. --The addon.com folder (public_html/addon.com) does NOT have an .htaccess file. Maybe this is because HostGator servers treat addon domains like subdomains? --The public_html/.htaccess (primary domain) does not have anything related to the addon domain. – T Bone Dec 8 '15 at 20:36
  • Garth and @FFrewin: 2nd part: Here's what else I tried: ---Disabeld SEF and URL Rewrite to test, and I was able to access all of the pages. Re-enabling SEF URLs caused me to be thrown out of Admin panel (500 Internal Server error). So, I re-enabled SEF and URL Rewrite. -- In Joomla .htaccess code is: Options +FollowSymLinks #RewriteBase /cmsfolder/ (Worked for viewing sites but can't access admin. 404 Category not found error.) -- Additional thoughts? Please be pretty specific about what other you info need (remember, newbie!!). --Thanks much for your time. – T Bone Dec 8 '15 at 20:37
  • 1
    In your addon domain directory, try setting: in the config file public $live_site = '' to public $live_site = 'whateveryourbaseURLis' in .htaccess change Options +FollowSymLinks to #Options +FollowSymLinks and/or change #RewriteBase /cmsfolder/ to RewriteBase / – garth Dec 9 '15 at 2:03
  • @TBone, just saw your comments here... in the addon folder you need to have the .htaccess file for the joomla instance you have in that folder and make sure the RewriteBase is uncommented and set to as " /" (no quotes). – FFrewin Dec 9 '15 at 12:29
  • FIXED!!! After I moved the Joomla .htaccess file to the addon root (DUH! Newbie or not, DUHDUHDUH on my part), this is what worked: In config, public $live_site = '' and in .htaccess #Options +FollowSymLinks with RewriteBase / This lets me see all subpages and I can access Admin. Thanks, Frewin and @garth, for all your time, help, and patience! Really - I owe you one! – T Bone Dec 10 '15 at 17:14
0

This is what finally fixed the problem for me. Thanks to everyone that took time to respond and to help troubleshoot, especially @garth and @FFewin.

Moved Joomla .htaccess file to the addon root.

In .htaccess: Commented out Options +FollowSymLinks Enabled RewriteBase /

[NOTE: RewriteBase / originally was RewriteBase /cmsfolder/ ]

Config file: public $live_site = ''

To reach Admin, changed direct-access URL to reflect new direct Website path to Joomla site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.