Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: NoCoZ on April 25, 2008, 03:04:21 PM

Title: [SOLVED] Redirecting www.domain.com/joomla to www.domain.com/
Post by: NoCoZ on April 25, 2008, 03:04:21 PM
hi everyone,

I'm pretty new to using SME and i have just installed SME 7.3 and the joomla 1.5 contrib (http://wiki.contribs.org/Joomla).
My problem is that by default, the contrib installs joomla in
Code: [Select]
/opt/joomla and the default website is located at
Code: [Select]
/home/e-smith/files/ibays/Primary/html
Therefore, if i want to visit my joomla website (assuming that my domain is domain.com) I have to enter the following URL : http://www.domain.com/joomla (http://www.domain.com/joomla). BUT (there is always a BUT) I would like that the default website root (http://www.domain.com/ (http://www.domain.com/)) points directly to my joomla installation.

After having a look on httpd.conf I saw that my problem might be linked to modifying the VirtualHost entries (seems that the linked template is /etc/e-smith/templates/etc/httpd/conf/httpd.conf/80VirtualHosts).

However, I don't know how to modify the template file (or if there is something else to modify) to achieve my goal. Any help would be welcome because I have been spending days on it and have been searching for it on many forums / websites without finding the answer.

NB : I also have gallery2 and phpmyadmin intalled in /opt/ but I don't need to make them move)

Thanks in advance !

Title: Re: Redirecting www.domain.com/joomla to www.domain.com/
Post by: jester on April 25, 2008, 03:29:23 PM
Hi NoCoZ,

This might be off assistance.... please search though!
http://wiki.contribs.org/Web_Application_Redirect_Tutorial (http://wiki.contribs.org/Web_Application_Redirect_Tutorial)

HTH.
Title: Re: Redirecting www.domain.com/joomla to www.domain.com/
Post by: Jáder on April 25, 2008, 03:31:50 PM
I think the fastest, simpliest way is to edit index.html from primary ibay and change it to:
Code: [Select]
<meta http-equiv="refresh" content="10; url=http://www.mysite.com/joomla/">

of course change mysite.com  :D


This is called redirect and if you need more info you can google for it.

Good luck.

Jáder
Title: Re: Redirecting www.domain.com/joomla to www.domain.com/
Post by: NoCoZ on April 25, 2008, 03:41:49 PM
Thanks for your answers.

Jader, I've been thinking of the redirect option, ut i wanted something more clean (i do not mean here that your solution is dirty  :lol: )

Jester, I've already been looking at that linked you've just sent me, but i'm not sure it applies to my problem because it deals with virtual domains (whereas my domain.com is a real, not virtual i mean, domain). Maybe my english is not good enough and i didn't understand all of it. So could you just confirm if the Web application redirect tutorial applies to my problem ?

Thanks again
Title: Re: Redirecting www.domain.com/joomla to www.domain.com/
Post by: raem on April 25, 2008, 05:40:27 PM
NoCoZ

Quote
...could you just confirm if the Web application redirect tutorial applies to my problem ?

Yes it's exactly the reason the Howto was created.
Title: Re: Redirecting www.domain.com/joomla to www.domain.com/
Post by: NoCoZ on April 28, 2008, 09:04:12 AM
Thank for your answer, I'll be back to my server on the end of the week and tell you the results once I've tried that solution.
If I asked the question "does it apply to my problem" it is because the Web App Redirection tutorial Scenario is as follows :

Quote
You want to have a web application in /opt
You want to have a virtual domain(s) on your sme server
You want to access the web app in /opt/appname using the virtual domain ie www.myvirtualdomain.com

Or my scenario is a bit different :
- I have my web app (joomla) in /opt (no difference there)
- I don't want to have a Virtual domain (I want to use my real domain : joomla has to be accessible from the Internet using myrealdomain.com)
- I want to access the web app in opt/joomla using the real domain (not myvirtualdomain.com)

Maybe that I don't really understand the difference between a virtual domain an what I call a real domain ?

I'll keep you informed !

Title: Re: Redirecting www.domain.com/joomla to www.domain.com/
Post by: raem on April 28, 2008, 09:32:08 AM
NoCoZ

Just change the code in the Howto to read

config setprop joomla status enabled
config setprop joomla domain www.mydomain.com
expand-template /etc/httpd/conf/httpd.conf
sv h /service/httpd-e-smith
Title: Re: Redirecting www.domain.com/joomla to www.domain.com/
Post by: NoCoZ on May 02, 2008, 08:37:39 AM
Hi all,

As I said, I will be back on my server at the the end of the week and here am I  :)
So I did what the redirection tutorial said and guess what .. IT WORKS ! even if I had some problems at the beginnning (rebooted the server and nothing happened, I retried and now all is ok)

So thanks a lot for your help people !  :-D