Subdomains and ccgi
- 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
- :
- Subdomains and ccgi
Subdomains and ccgi
19-05-2016 10:17 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I need help please with directing a subdomain to the cgi server.
I have a domain with a working www cname. No problems there. I have created a new subdomain an identical right field but the new.domain.co.uk brings up a page saying: Not Authorized to View This Page [CFN #0004]
My DNS records are as follows:
domain.co.uk. | a | 91.136.8.9 | |
www | cname | ccgi.plus.net. | |
new | cname | ccgi.plus.net. |
My .htaccess file is as follows:
RewriteCond %{HTTP_HOST} ^new\.domain\.org\.uk$ [NC]
RewriteCond %{REQUEST_URI} !^/dir1/
RewriteRule (.*) /dir1/$1 [L]
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.org\.uk$ [NC]
RewriteCond %{REQUEST_URI} !^/dir2/
RewriteRule (.*) /dir2/$1 [L]
I guess the problem lies with the .htaccess file but would welcome help with the correct code. Many thanks.
Re: Subdomains and ccgi
19-05-2016 1:54 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@civval wrote:
My .htaccess file is as follows:
RewriteCond %{HTTP_HOST} ^new\.domain\.org\.uk$ [NC]
RewriteCond %{REQUEST_URI} !^/dir1/
RewriteRule (.*) /dir1/$1 [L]RewriteCond %{HTTP_HOST} ^(www\.)?domain\.org\.uk$ [NC]
RewriteCond %{REQUEST_URI} !^/dir2/
RewriteRule (.*) /dir2/$1 [L]I guess the problem lies with the .htaccess file
don't know much about htaccess (have tried but find aspects of it unfathomable) however one of the things I'd taken on board was that ^ (caret) is the "opener" and $ (dollar sign) is the "closer". In the first rewrite cond (of each block) there is both, ie ^$, whereas in the second rewrite cond (of each block) there is only ^ (I understand that ! [exclamation mark] signifies "not"). No idea if adding the $ would help, just flagging up in case.
The only other thing that occurred to me as possibly relevant is to have rewrite engine on, at the beginning, but assumed you'd simply not quoted that line from your htaccess file.
Project HappyChild - free educational resources for children + schools * my own [personal] webpage is at pennymidasrollo.plus.com
Re: Subdomains and ccgi
19-05-2016 3:50 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@civval wrote:
I guess the problem lies with the .htaccess file but would welcome help with the correct code.
It depends, but possibly not. As Penny mentioned RewriteEngine On is needed before the rules, but I assume that was omitted here for brevity. The DNS settings refer to domain.co.uk whereas the host lines in .htaccess use domain.org.uk. But I expect that is a slip when anonymising the text. I'll use domain.co.uk in my reply.
Have you checked that DNS is physically set up correctly (eg using nslookup on a PC) so that new.domain.co.uk returns the correct host IP? I think it probably does since the error message looks to be one issued by the Hostopia server.
Next, has domain mapping for new.domain.co.uk been set up on the Hostopia server to direct requests to your webspace? (If you login to the Hosting control panel does new.domain.co.uk appear in the Domain Management selection list?) I suspect it is absence of this mapping that is giving you the error.
----
@Penny The condition on HOST lines in .htaccess finishes with a terminating $ because the complete field has to match. The condition on URI lines lacks the terminating $ because just the first few characters are being checked (ie "doesn't start with") - other characters might follow.but are irrelevant.
Re: Subdomains and ccgi
19-05-2016 4:51 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Many thanks for your input. In response:
- yes RewriteEngine is on (the www subdomain works fine)
- yes I slipped up in anonymising the text both are the same domain
- yes the new subdomain is correctly reaching the plusnet cgi server
So it could well be the domain matching you refer to. I have the naked domain listed correctly but not the www sub-domain and that does work correctly. So might the new subdomain need to be treated differently? Is this something that requires a support ticket?
Thanks, again, for your help.
Re: Subdomains and ccgi
19-05-2016 5:10 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
On further digging in this forum I have found some very old posts that indicate that subdomains are not supported on the ccgi server. So perhaps that is the very simple explanation! It would be helpful if a PlusNet representative could confirm if this is the case. Thanks.
Re: Subdomains and ccgi
19-05-2016 5:13 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
civval wrote:
So it could well be the domain matching you refer to. I have the naked domain listed correctly but not the www sub-domain and that does work correctly. So might the new subdomain need to be treated differently? Is this something that requires a support ticket?
i think the naked domain covers the www subdomain by default, but that doesn't extend to other subdomains. As you queried getting mapping added for the new subdomain requires a hosting support ticket to be raised.
Re: Subdomains and ccgi
19-05-2016 5:14 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@bobpullen I think that this is one for you
Re: Subdomains and ccgi
19-05-2016 5:26 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@civval, sub-domains aren't formally supported, however if you drop me a private message containing the subdomain you're trying to set up then I'll see what I can do.
Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page