Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Two domains question
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Two domains question
Two domains question
26-11-2008 3:41 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I've got two domains on the Force9 DNS.
One is co-hosted on the HTML and CCGI server - bit of a mess but it works so the site has both www.mydomain1.co.uk and ccgi.mydomain1.co.uk links.
I now have a new domain supposidly pointed at the ccgi server, but not sure how to partition it. I want www.mydomain2.co.uk to point to a sub directory on the CCGI server and then everything will run below that. The two sites are totally separate.
What do I need to setup in DNS config? At the moment both URLS are running directly into my www.mydomain1.co.uk hosting. Could it by my .htaccess file on the WWW server geting in the way?
One is co-hosted on the HTML and CCGI server - bit of a mess but it works so the site has both www.mydomain1.co.uk and ccgi.mydomain1.co.uk links.
I now have a new domain supposidly pointed at the ccgi server, but not sure how to partition it. I want www.mydomain2.co.uk to point to a sub directory on the CCGI server and then everything will run below that. The two sites are totally separate.
What do I need to setup in DNS config? At the moment both URLS are running directly into my www.mydomain1.co.uk hosting. Could it by my .htaccess file on the WWW server geting in the way?
Message 1 of 4
(1,810 Views)
3 REPLIES 3
Re: Two domains question
27-11-2008 11:31 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi,
I would use a simple redirect page, if I were you
This file needs to be in your home cgi folder as your domains are already pointing to ccgi, some modifications are required.
Hope this helps
I would use a simple redirect page, if I were you

This file needs to be in your home cgi folder as your domains are already pointing to ccgi, some modifications are required.
Quote <html>
<head>
<title>your initial page title goes here</title>
<script language=javascript>
var whois=location+" "
if (whois.indexOf("mydomain1.co.uk") != -1)
{ window.location ="domain1folder/index.php" }
if (whois.indexOf("www.mydomain1.co.uk") != -1)
{ window.location ="domain1folder/index.php" }
if (whois.indexOf("mydomain2.co.uk") != -1)
{ window.location ="domain2folder/index.php" }
if (whois.indexOf("www.mydomain2.co.uk") != -1)
{ window.location ="domain2folder/index.php" }
</script>
</head>
<body>
</body>
</html>
Hope this helps
Message 2 of 4
(487 Views)
Re: Two domains question
28-11-2008 2:30 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Just wanted to say thanks to Rami who sorted this for me.
The DNS has to be:
dukesfarm.co.uk. a 84.92.1.5
www cname ccgi.force9.net.
and then you can use a .htaccess in the root of CCGI to partition domains by directory:
RewriteCond %{HTTP_HOST} ^www.dukesfarm.co.uk$ [nc]
RewriteCond %{REQUEST_URI} !^/dukesfarm/
RewriteRule (.*) /dukesfarm/$1
The DNS has to be:
dukesfarm.co.uk. a 84.92.1.5
www cname ccgi.force9.net.
and then you can use a .htaccess in the root of CCGI to partition domains by directory:
RewriteCond %{HTTP_HOST} ^www.dukesfarm.co.uk$ [nc]
RewriteCond %{REQUEST_URI} !^/dukesfarm/
RewriteRule (.*) /dukesfarm/$1
Message 3 of 4
(487 Views)
Re: Two domains question
28-11-2008 4:39 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
That looks shorter thank my Javascript!
Changing the first line to:
RewriteCond %{HTTP_HOST} ^(www\.)?dukesfarm.co.uk$ [NC]
will allow you to redirect both with and without the www
meanwhile I will stick to my javascript cause it's easier for me
Quote from: mar7t1n RewriteCond %{HTTP_HOST} ^www.dukesfarm.co.uk$ [nc]
RewriteCond %{REQUEST_URI} !^/dukesfarm/
RewriteRule (.*) /dukesfarm/$1
Changing the first line to:
RewriteCond %{HTTP_HOST} ^(www\.)?dukesfarm.co.uk$ [NC]
will allow you to redirect both with and without the www
meanwhile I will stick to my javascript cause it's easier for me

Message 4 of 4
(487 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page