Forgot?

Putting a component in a sub directory

Reply Topic
Link to this post 20 Apr 08

I want to set up my site, so that most of the components are in a subdirectory. For example ninjoomla.com uses fireboard
so instead of http://www.ninjoomla.com/index.php?option=com_kunena&Itemid=33&func=post&do=reply&catid=5

I would like to see it as

www.forum.ninjoomla.com.


I searched Google , but didn't find any true answer on how to make this process easier. Any idea would be greatly appreciated. Thanks.

Link to this post 21 Apr 08

Hi,

Welcome aboard Ninjoomla.com. Hope you enjoy your life stay here and get the most you can from our Ninja Extensions...


From what i can say this is not possible to do with joomla! The most you can do is something like www.ninjoomla.com/component/forum using some kind of SEF URLs component!

Anyway making your forum.ninjoomla.com subdomain redirect to:
http://www.ninjoomla.com/index.php?option=com_kunena&Itemid=33&func=post&do=reply&catid=5
should solve your problem no?

Best Regards,

Link to this post 21 Apr 08

Hi Barton,

I will disagree with Ricardo an say it might be possible, but will be very difficult.

You may be able to use an SEF component for it, to redirect from the forum.mysite.com to the real address. Most SEF components allow you to set custom urls

Though I am not sure really if it would work or not. I would love to hear if it does though.

Link to this post 22 Apr 08

Hi Barton,

welcome aboard. Nice to have you here. :)

I agree with Daniel. It will be a very difficult job. As you wrote, you want to call a component from a sub domain, not from a sub directory. In this case you would have to modify source codes of the related components, in order to modify the variable $mosConfig_live_site which is used by the most components to build URLs in the HTML source code.

I do not know all available SEF components, but OpenSEF cannot do this job. IMHO SEF components only do manipulate the URIs, what is actually the folder part behind the domain part.


Best Regards
Uwe

Link to this post 22 Apr 08

out of the box here,

but as we havent figured a solution yet,

you could set up multiple joomla sites on multiple subdirectories.

forum.mysite.com
cb.mysite.com
gallery.mysite.com.

make all those components the default homepage on each subdomain and theme them all the same.

then comes the tricky bit, and link all the databases into one,
thus having 10 joomla sites but looking like 1.
lot of work to simply have subdomains

Link to this post 24 Apr 08

Hey guys my return ... :P

Isnt easier if he setup subdomain to redirect to component...?

I mean have:
forum.mysite.com - redirecting to - index.php?option=com_kunena;

users.mysite.com - redirecting to - index.php?option=com_comprofiler;

gallery.mysite - redirecting to - index.php?option=com_xxx;

Anyway is just a guess! :P

Link to this post 24 Apr 08

There are opinions here from a number of people looking at this from slightly different perspectives and mine is no different. I think the consensus is that, if you want to pursue this layout/concept then, you're heading for a world of pain and heartache :(

Essentially a sub-domain, i.e. forum.ninjoomla.com, is viewed as an entirely separate domain and entirely separate from it's "parent". That's not to say there aren't ways around that but they are complex.

HTH

Steve

Link to this post 07 May 08

Thanks guys, it is really have great support and people looking at the box from different angel. I do understand that this would be hard, so i am going to drop it here. As one would say, "there isn't enough advil in the western hemisphere to deal with that pain"

So I would like to take this discussion along a different path. Subdomain. Joomla forum talks about it, but there really any solution to it and I really have some trouble figuring it out. I have my main site www.aaffrii.com, then I created a subdomain for my client so that they can see their website development process. So I have it has keya1.aaffrii.com

I changed the absolute path to:

$mosConfig_absolute_path = '/home/aaffrii0/public_html/keya1//';
$mosConfig_admin_expired = '1';
$mosConfig_allowUserRegistration = '0';
$mosConfig_back_button = '1';
$mosConfig_cachepath = '/home/aaffrii0/public_html/keya1///cache';

and

$mosConfig_live_site = 'http://www.keya1.aaffrii.com';[/code]

Then I get the 500 error, how lovely. 

So any idea to resolve this?

Another question: how can I access the administrator path, this is after a fresh install of joomla? I don't think I can put www.keya1.aaffrii.com/administrator?


I mean how nice would it be to have ninjoomla create a component that allow joomla users resolve this issue.:woohoo: I am just throwing that out......;)

Link to this post 07 May 08

try dropping the www off the mos config live site.

Link to this post 07 May 08

Daniel is spot on with his suggestion of dropping the "www" from your $mosConfig_live_site declaration.

When considering sub.domains you should drop it from your thinking altogether so that every instance where you'd be thinking


http://www.domain.com

you should always think


http://sub.domain.com

From that, if you navigate to keya1.aaffrii.com/administrator then you will find your admin section for that joomla install.

The easiest way to get your head around sub.domains is to think of them as totally separate domains. Essentially, the only element of a sub.domain scenario that thinks that a domain and a sub.domain are essentially related is the human element. True there is some jiggery pokery going on in computer land, on the server, to blur this boundary. But it's easier to get you head around this by thinking of the concept of domain.com and sub.domain.com as separate entities.

If you've re-assessed your original objective and you're working on developing within the sub.domain for visibility for your client then you would be better off working in a separate database, dedicated to the sub.domain

BUT

I notice that you are already using Joomla on your live site, so:

When you have completed your development you can't simply transfer the development database across onto your live database because this will kill your existing install - lot's of really really bad things will happen to your data and you will cry yourself to sleep many many nights! ;)


There is no easy way to transfer a development install of Joomla onto an active, live Joomla site.

Link to this post 07 May 08

(hmm, interesting FB bug there - I've lost the formatting of my last section above - it is displayed as one large paragraph but it's written as 3 or 4 separate paragraphs ...if I go back to edit the entry then the paragraphs are still there. What's a man to do, eh???? )

Link to this post 07 May 08

So subdomain and the original domain are two different things, even though it is on MY website? I will keep this in mind.
Regarding

BUT I notice that you are already using Joomla on your live site, so: When you have completed your development you can't simply transfer the development database across onto your live database because this will kill your existing install - lot's of really really bad things will happen to your data and you will cry yourself to sleep many many nights!  There is no easy way to transfer a development install of Joomla onto an active, live Joomla site. 

Yes, I am using Joomla on my live, and would like to use the subdomain as development site. They both have different databases. I will be transfering the development site to a totaly different website, such as www.clientwebsite.com., instead of www.mysite.com, and not my beloved site. So, will this still cause a problem when I transfer it to the live site?

If so, why would it cause a problem?

Link to this post 07 May 08

barton91 wrote:

So subdomain and the original domain are two different things, even though it is on MY website? I will keep this in mind.

It's a bit of a hybrid situation, but the easiest way to think about it is to think of them as two separate domains.

barton91 wrote:


Yes, I am using Joomla on my live, and would like to use the subdomain as development site. They both have different databases. I will be transfering the development site to a totaly different website, such as www.clientwebsite.com., instead of www.mysite.com, and not my beloved site. So, will this still cause a problem when I transfer it to the live site?

If so, why would it cause a problem?

Doing it this way around should cause you very few problems - all you will have to look for is broken links and mis-referenced domains. They will happen but they are easily fixed.

The other scenario, of developing on one database and transferring that development site onto an already live Joomla installation would cause problems because there is no easy way to merge the two databases.

But, as I say, developing in one place and then transferring that development data to a clean/fresh install should cause you minimum problems.

Link to this post 07 May 08

Thanks, I will try that out tomorrow and see what happens.

Link to this post 08 May 08

What not many people realise is that www is actually a subdomain.

It hails from the early days of the web when your web, and mail and all the other functions were usually on different machines.

mail.domain.com was recognised as the place for mail to go
www.domain.com was the place for your main website to go.

But we don't use the complicated system setups we did back then. www is actually technically redundant now.

domain.com should be your main site.

a domain can only have one level deep of subdomains if I remember corectly, so saying www.subdomain.domain.com is trying to go 2 sub domains deep. The www subdomain of the subdomain subdomain (get that one??).

I hope that clears up a few things.

Link to this post 09 May 08

thanks for that. I didn't know about the WWW as a domain. Will keep this in mind. Is there anything I should change when I create a subdomain? I changed the

$mosConfig_live_site = 'http://keya1.aaffrii.com';[/code]
the mosConfig_db is the same, and I checked my Cpanel to make sure that it is the correct user.

:blink: Something funny happened: So I have another live site, within the same cpanel. So my main site is in public_html, and the other site is public_html/mysite2, very similar to the subdomain that I wanted to create. I was looking at the Configuration.php and comparing it to the subdomain. I accidentally FTP the subdomain configuration.php to the other live site and it loads. Isn't that weird? 

Any reason why?

Link to this post 09 May 08

Permission, permission. Since I installed the site through FTP, it didn't take the proper permission for it to load correctly. I looked at the same permission for my other site and made my subdomain site permission the same. I am happy to say, that I have my sub domain up and running...

Thank you for all your help ninja.....

Link to this post 11 May 08

Cool! :)

Link to this post 11 May 08

Now that I a know how to manually create a subdomain, permission and all. I am thinking of replicating my Joomla site within each sub domain and removing all components except 1 component, i.e Fireboard. I am then thinking of linking to the same database.

For example my live joomla site has Forum, Events, etc...
I am thinking of copying the entire site into a subdomain, such as forum.mysite.com. I would then link it to the same database mysite_db. Once I have the site linked, I would go into forum.mysite.com/administrator and remove all the other components except for fireboard. I would do the same thing for events.

What do you think about that idea? I would be the same as putting a component in a subdirectory...

Link to this post 12 May 08

Well, I give you 10/10 for persistence!

Can I ask a question from a different angle? What are you trying to achieve, i.e. what end-result are you looking for?

Maybe you might find it easier to test your ideas on your own PC by installing/using something like this:

Joomla Stand-Alone Server (JSAS)


Then if anything serious breaks it is only your development data that is affected and not your live site.

Hope that helps

Link to this post 13 May 08

barton91,

I'm no expert on the matter, but it is possible your sessions won't be kept alive when browsing from the main domain to the subdomain.

Eg. if login on main domain, then browse to forum (on subdomain), you may need to login again.

Don't take my word for it though. Please try and let us know how it goes. I would love to be proved wrong in this regard.

If you can get it going, and can explain how you got it done, I have a treat for you that I think you'll like :)

Good luck,
Mark

Link to this post 14 May 08

Yeah Mark is right, they will effectively be seperate site, so you will need to log into each one. This is what they do at Joomla.org by the way. And is why you log into the forum and the extensions site seperately.

Link to this post 20 May 08

Thanks guys, I really appreciate all the help with this one. The reason why I wanted it, is because I wanted visitor to be able to directly connect to the part of the site that interested them, i.e news.mysite.com or forum.mysite.com. I guess, after thinking about it. I just leave it the way it is, because the front page is the hub of my site. Thanks, again.

Link to this post 24 May 08

Glad it's sorted :)

Home Forum General The Tea House Putting a component in a sub directory