cancel
Showing results for 
Search instead for 
Did you mean: 

Subdomains and ccgi

civval
Dabbler
Posts: 22
Fixes: 1
Registered: ‎30-12-2007

Subdomains and ccgi

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.    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.

 

7 REPLIES 7
Penny
Superuser
Superuser
Posts: 995
Thanks: 547
Fixes: 5
Registered: ‎05-04-2007

Re: Subdomains and ccgi


@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


@civval

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.

Penny Rollo * Force 9 from 17/02/98 * PlusNet from 2000 onwards
Project HappyChild - free maths worksheets, free French-English worksheets + 12 other languages
personal site www.pennymidasrollo.plus.com
Superusers are not PlusNet staff but do have a direct line of communication into the business to raise issues, concerns and feedback from the Community.
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,370
Fixes: 75
Registered: ‎06-04-2007

Re: Subdomains and ccgi


@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.

David
civval
Dabbler
Posts: 22
Fixes: 1
Registered: ‎30-12-2007

Re: Subdomains and ccgi

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.

 

civval
Dabbler
Posts: 22
Fixes: 1
Registered: ‎30-12-2007

Re: Subdomains and ccgi

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.

spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,370
Fixes: 75
Registered: ‎06-04-2007

Re: Subdomains and ccgi


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. Smiley

David
Oldjim
Community Veteran
Posts: 38,460
Thanks: 1,035
Fixes: 62
Registered: ‎15-06-2007

Re: Subdomains and ccgi

@bobpullen I think that this is one for you

bobpullen
Community Gaffer
Community Gaffer
Posts: 15,023
Thanks: 2,669
Fixes: 171
Registered: ‎04-04-2007

Re: Subdomains and ccgi

@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 ⤵