help taking add-on domain development site live

Permalink
Hi, I'm a newbie to c5 with very little web experience. I'm enjoying using c5 very much, and I'm embarrased to have to post this b/c I've read several related threads, but I still can't seem to solve my problem.

My hosting company is Hostmonster. I have a primary domain and several independent add-on domains, all containing existing sites that I'd like to replace one-by-one with new c5 sites I'll be developing. To start, using Simplescripts, I installed c5 in a subdirectory in one of my add-on domains as follows:
/public_html/myaddondomain/concrete5

I built a site and everything is working great! All the files for it reside within the concrete5 directory. Now I want to make that site go live, without having to delete all the existing site's files that reside in the higher level directory, i.e.:
/public_html/myaddondomain/

I know I need to edit the following file:
/public_html/myaddondomain/concrete5/config/site.php

and I may also need to edit an .htaccess file, but I'm not sure which one (there is one in each directory).

Can someone please help me with simple, clear instructions on how to turn the c5 dev site in my add-on domain on and off given this directory structure? I can then repeat this process with separate c5 installations in each of my add-on domains.

Thanks so much!

 
brabin replied on at Permalink Reply
OK, I haven't gotten any help here yet, but here's an update.

The support folks at Hostmonster added this line to the .htaccess file in the /myaddondomain directory:
DirectoryIndex /concrete5/index.php

This redirects any site requests for myaddondirectory.com to the home page in the concrete5 directory, which is great. However, navigating the site from the home page then shows all the urls having the myaddondomain/concrete5/pagename structure, which is not what I want. How do I fix this? It seems like it should be easy to do from within the Dashboard, but it's not clear to me.

Thanks.
Mainio replied on at Permalink Reply
Mainio
In your /config/site.php add this line:
define('DIR_REL', '');


Should fix the problem above.

Antti / Mainio
brabin replied on at Permalink Reply
OK, I did that and now I get a "page not found" error when visiting the site homepage :(

Do I now need to remove the DirectoryIndex pointer from the higher level .htaccess file, or what?

Thanks for helping Mainio!
Mainio replied on at Permalink Reply
Mainio
Yeah, ok looking at the code a lot seems to rely on that constant, so sorry for pointing out the wrong answer.

Is there a specific reason why you want that to be in the subdirectory?

I'm not an expert on running concrete5 from a subdir but you could probably set up a symlink in the root for:
ln -s concrete => concrete5/concrete


After that, copy the index.php from the concrete5 subdir to the root of your website and I think it might work out.

Antti
brabin replied on at Permalink Reply
Antti,
It's in the public_html/myaddondomain/concrete5/ subdirectory because:
(1) that's where SimpleScripts installed it,
(2) I have existing old site files in public_html/myaddondomain directory that I'd like to leave until the new site is fully tested, and
(3) I have multiple, different add-on domain subdirectories in the host root directory that I'd like to also convert to concrete5 sites, which I understood was most easily accomplished with separate, individual installs of concrete5 in the individual add-on domain subdirectories.

I am new to this and not very skilled, so if there's a better way to handle this situation, I'd sure like to know.

I'll try your suggestion, but I'm not sure it will work as there are already index.html and php.ini files in the myaddondomain directory.
Mainio replied on at Permalink Reply 1 Attachment
Mainio
Ok, noticed I had actually done something like this previously in this how-to:
http://www.concrete5.org/documentation/how-tos/developers/native-mu...

Here's a bit more of a "working" solution attached in this message. Place that index.php in your root and remove the "DirectoryIndex" configuration from your .htaccess.

Antti
brabin replied on at Permalink Reply
Didn't work :( The old site's index.html file, still there, is what comes up.
Mainio replied on at Permalink Reply
Mainio
Ok, then I'm quite out of advice at this point.

Open up that index.php file and also /concrete/config/base.php files and see what you need to modify to get concrete5 pointing to the correct directories.

Sorry! Seems to be quite case-specific thingy here.

Or other (easier) option is just to go with the original DirectoryIndex solution and don't mind those links.

EDIT: noticed you edited the message above so you could still try this in your .htaccess:
DirectoryIndex index.php index.html


That changes their lookup order, index.php being the first one.
brabin replied on at Permalink Reply
OK. So, I can go with the easier solution for now, just living with the undesirable links.

But once I've completed all testing and I'm willing to remove the old site's files from the public_html/myaddondomain directory, how then do I set up so that the links are as I prefer? Do I need to move some files (more than just index.php) from the /concrete5 subdirectory up one level and remove the "DirectoryIndex" config from the .htaccess file? Or is there a better way?
Mainio replied on at Permalink Reply
Mainio
By default, you should have all the directories & files you currently have in your /concrete5 folder moved one level up so that they would all be in /public_html/myaddondomain