Multiples Sites - one host - .co.nz domain

Using a single web hosting account to host multiple sites

Multiples Sites - one host - .co.nz domain

Postby bigmig » Sat Apr 05, 2008 9:01 pm

Forgive me for this post, but I am having no luck figuring out how to do this.

I have a single host (on godaddy), and am trying to get multiple joomla sites arranged properly.

My first site, domain1.co.nz is within the root, and the second site is within the directory /domain2

I have use these rewritecond and I have got the redirect working, but when you are on the domain2.co.nz site, it always shows the subdirectory, domain2. There are also some // issues from certain pages too.

RewriteCond %{HTTP_HOST} domain2.co.nz$ [NC]
RewriteCond %{REQUEST_URI} !^/domain2/.*$
RewriteRule ^(.*)$ /domain2/$1 [QSA,L]

Can anyone help me with how I should structure the rewrites so that the

www.domain1.co.nz --> /

www.domain2.co.nz --> /domain2/

and in the future add another domain3 --> /domain3/


I was wondering if the domain .co.nz was something to do with it. I have tried many options but all the examples have .com, and I dont know how to do that.

Any help appreciated.

thanks
b.
bigmig
 
Posts: 2
Joined: Sat Apr 05, 2008 8:51 pm

Postby richardk » Mon Apr 07, 2008 12:35 pm

Try
Code: Select all
options +FollowSymLinks

RewriteEngine On

# Add missing trailing slashes for example.co.nz.
RewriteCond %{HTTP_HOST} ^(www\.)?example\.co\.nz$ [NC]
RewriteCond %{DOCUMENT_ROOT}/example%{REQUEST_URI}/ -d
RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]

# example.co.nz to /example
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} ^(www\.)?example\.co\.nz$ [NC]
RewriteRule ^(.*)$ /example/$1 [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

didnt quite work

Postby bigmig » Wed Apr 09, 2008 1:39 am

thanks for your response. that didnt seem to work. typing in www.domain.co.nz gets to the right directory, but it seems to not pickup the template files that the CMS is delivering. I am running Joomla 1.5.2.
Also when then clicking on the links that are delivered it seems to not find the next page at all. I have left in in so you might be able to have a look. the site is www.ourplace.co.nz. Also it seems really slow, like the web server is in a bit of a tangle responding. do you think this could be the mod rewrite?
thanks
b.
bigmig
 
Posts: 2
Joined: Sat Apr 05, 2008 8:51 pm

Postby richardk » Wed Apr 09, 2008 2:03 pm

Some Joomla variable(s) will need changing (i don't know what they are) to set the base URL. It's putting /ourplace at the beginning of all the links.

Also it seems really slow, like the web server is in a bit of a tangle responding. do you think this could be the mod rewrite?

Is it like that without the mod_rewrite?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 7 guests

cron