Hi
So I've decided to get into hosting some basic sites as an addon service. I'm more used to IIS than Apache.
I've have the following:
- Main domain registered on cPanel: myname.co.za
- Additional domain: additionaldomain.com
I've added additionaldomain.com as an addon domain in cPanel.
My root web directory has an .htaccess file and 2 sub-folders: myname.co.za and additionaldomain.com.
I've turned off indexing so it doesn't list the sites. I want to basically have (www.)myname.co.za and (www.)additionaldomain.com point to their respective sub-folders. I also want to ensure that this does not happen:
* myname.co.za/myname.co.za
* myname.co.za/additionaldomain.com
This is what I tried in the .htaccess file:
I'm wanting these to be Wordpress sites so I've changed the permalinks accordingly.
So I've decided to get into hosting some basic sites as an addon service. I'm more used to IIS than Apache.
I've have the following:
- Main domain registered on cPanel: myname.co.za
- Additional domain: additionaldomain.com
I've added additionaldomain.com as an addon domain in cPanel.
My root web directory has an .htaccess file and 2 sub-folders: myname.co.za and additionaldomain.com.
I've turned off indexing so it doesn't list the sites. I want to basically have (www.)myname.co.za and (www.)additionaldomain.com point to their respective sub-folders. I also want to ensure that this does not happen:
* myname.co.za/myname.co.za
* myname.co.za/additionaldomain.com
This is what I tried in the .htaccess file:
Code:
#Site 1
RewriteCond %{HTTP_HOST} ^myname.co.za$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.myname.co.za$
RewriteCond %{REQUEST_URI} !myname.co.za/
RewriteRule (.*) /myname.co.za/$1 [L]
#Site 2
Same as site 1 but with additionaldomain.com
I'm wanting these to be Wordpress sites so I've changed the permalinks accordingly.