Recent Topics

1 Jul 30, 2015 03:32    

I have set up a second domain with a single collection, and now I want to add collections to function off that domain. How do I set up these URLs? So, for example, I have the main collection at

seconddomain.com

but if I set up a stub file such as

information.php

so I might have

seconddomain.com/information.php

I get

Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/public_html/information.php:1) in /home/xxxx/public_html/inc/_core/_misc.funcs.php on line 6628

Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/public_html/information.php:1) in /home/xxxx/public_html/inc/_core/_misc.funcs.php on line 6073

Headers have already been sent in information.php on line 1.
Cannot redirect.

How do I set up subsequent URLs for seconddomain.com?

2 Jul 31, 2015 03:35

Any assistance would be appreciated. I've been through the docs and can find nothing.

3 Jul 31, 2015 04:21

What version are you using?

You should use v6.6.1 and point all your domains to the same place and let index.php handle everything (don't use any stub file)

4 Jul 31, 2015 04:28

I'm using 6.5 and will upgrade when I sort this.

I don't understand how a second collection - information - will link to the second domain rather than the first. So if I set up collections 'information' , 'X', 'Y', etc., how do I set these up so that they are associated with the second domain. I have set the absolute URL for the second domain, but how do I get the others to not show as first domain? ie to be, for example,

www.seconddomain.com/information.php

not

www.firstdomain.com/information.php

Or am I missing the point?

5 Jul 31, 2015 04:37

If you have set the absolute URL for each collection and you have not modified the `index.php` and `.htaccess` files provided by b2evolution, then b2evo will automatically recognize the requested domain/absolute URL and display the correct collection.

6 Jul 31, 2015 05:22

So, I have collection URL and title, short name, URL filename 'bushfire' with absolute URL www.seconddomain.com/ - which works fine.

Now, I have collection URL and title, short name, URL filename 'questions' with absolute URL www.seconddomain.com/ - and a test post, which does not work fine. It picks up the template and displays:

404 Not Found
b2evolution cannot resolve the requested URL.

Standard index and htaccess.

7 Jul 31, 2015 14:21

You must not have 2 collections with the same url. You have to make a different URL for each collection. You can use sub domains or sub folders to differentiate.

8 Aug 01, 2015 02:05

Now, I have collection URL and title, short name, URL filename 'questions' with absolute URL www.seconddomain.com/questions/ - and a test post, which does not work fine. It displays:

403 forbidden
Access to this resource on the server is denied!

permissions for /questions 755

9 Aug 01, 2015 09:42

Is this a complication? I have moved the site to a new server through cPanel migration, so that seconddomain.com is set up as an Addon domain. But the new cPanel has a separate link to set up Aliases. I would remove the Addon and create an Alias, but I am just fishing in the dark - could this be a problem, as seconddomain.com/questions - which seems to be set up as suggested - will not work.

cPanel documentation seems to suggest that an alias is identical to a parked domain, and that where an Addon domain is not suitable for multiple domains that share the same address, a parked domain (Alias?) is suitable for such a purpose.

Which I am assuming - fishing in the dark - that this is what is wanted here.

10 Aug 01, 2015 10:16

Nope. No solution there. I had to remove the Addon domain as I did not have ownership. So I set up the Alias, and

seconddomain.com/questions/

produces a 403 error.

What about this then: when I edit the test post in collection 'questions', updating the post produces this error message:

'We did not automatically redirect you to [http://www.seconddomain.com/questions/test-post] because it's on a different domain.'

Which seems to go to the essence of the problem.

11 Aug 02, 2015 02:18

Have you read this: http://b2evolution.net/man/multiple-domains ?

Cpanel changes their names from time to time. I think what you want is a parked domain.

Step1 is that if you enter the URL of your second domain you see b2evolution responding with something (anything).

In all other cases (like your permissions error above), it's not a problem in B2evolution, it's a problem BEFORE b2evolution has even begin to execute.

Again step1: domainA.com and domainB.com should both show the same thing (or at least a B2evo generated page). Only once that works can we talk about how to set up b2evolution.

12 Aug 02, 2015 03:28

Yes. Read it many times. Can I clarify the situation: here is the primary domain:

http://www.taylorecology.com.au

here is the second domain:

http://www.qldbushfire.com.au (Note that this is displaying a different template - as it should - and it is displaying the appropriate collection.)

All works as it should for this second domain which is displaying the collection 'bushfire'. So now I am setting up a second collection, which I want to be 'www.qldbushfire.com.au/questions'. This is to display a collection called 'questions', which exists, and has a test post in it. If I set the absolute URL for the collection 'questions' to 'www.qldbushfire.com.au/questions/', I get a 403 error. I do not get a 403 error for the collection 'bushfire' when I go to the URL 'www.qldbushfire.com.au'. So the second domain is functioning OK.

But I cannot get a second collection to function on that domain. It would seem that I need the absolute URL

http://www.qldbushfire.com.au/questions/

Yes? If not, then what? How is it not the case "that b2evo will automatically recognize the requested domain/absolute URL and display the correct collection"?

If the absolute URL 'http://www.qldbushfire.com.au/questions/' does not display the collection 'questions' on the domain 'www.qldbushfire.com.au', what will?

13 Aug 02, 2015 17:30

So your problem is not with multiple domains but with subdirectories.

Again your error message happens BEFORE b2evolution is called.

(so yes, you would configure the subdir in the absolute URL in b2evo but this is NOT the issue here).

You would have the same issue if trying to run one of the first 2 blogs with a subdirectory in the URL.

So you have a problem with your webserver setup. You are probably **not** using the default .htaccess file provided by b2evolution. If you are, then it means your web host is blocking something. In this case we'd like to know who that host is for our records of problems. And on your site you need to contact them to ask why they block you from using the .htaccess commands you want.

14 Aug 03, 2015 03:59

@fplanque wrote earlier:

You would have the same issue if trying to run one of the first 2 blogs with a subdirectory in the URL.

If I use a subdirectory in 'bushfire' I don't get a 403 - it displays the primary domain index.php

@fplanque wrote earlier:

So you have a problem with your webserver setup. You are probably **not** using the default .htaccess file provided by b2evolution. If you are, then it means your web host is blocking something. In this case we'd like to know who that host is for our records of problems. And on your site you need to contact them to ask why they block you from using the .htaccess commands you want.So your problem is not with multiple domains but with subdirectories."

I uploaded a fresh copy of sample.htaccess and renamed it. Contacted the server people - netvirtue.com.au - who said that they have no rules at work there other than what is in .htaccess.

For whatever reason, the subdomain now works - questions.qldbushfire.com.au finds the 'questions' test post. It worked before I contacted the server people!

15 Aug 03, 2015 23:06

So replacing the .htaccess file did the trick?

16 Aug 04, 2015 01:53

No. It was an identical .htaccess file. Events not contemporaneous. I've been fiddling with this stuff for hours, over which I lose sight of changes made and unmade.

If the subdomain works, what might be involved in the subdirectory not working? The fact that the subdomain works is great, but it is not what one would expect to see in a URL.

17 Aug 04, 2015 22:59

Hum... can you try to make subfolders work on your main domain ($baseurl) (using the URl option "subfolder of main domain" instead of "absolute URL")?

I'm starting to wonder if there is a bug when using absolute URL.

18 Aug 05, 2015 07:56

If I use 'extra path on baseurl' as 'http://www.taylorecology.com.au/testsub' it displays the default collection;

If I use 'relative to baseurl: http://www.taylorecology.com.au/testsub/' it displays the default collection;

If I use 'Absolute URL' http://www.taylorecology.com.au/testsub/ it displays the default collection;

If I use 'Extra path on index.php http://www.taylorecology.com.au/index.php/testsub/' it displays the default collection.

Cleared cache/s throughout.

19 Aug 05, 2015 17:24

So if subfolders never work and you are sure about using the right .htaccess, please confirm you also use the default index.php file from b2evolution 6.6.1.

Note: I see you use `http://www.taylorecology.com.au/news.php/bushfires` instead of a cleaner `http://www.taylorecology.com.au/bushfires` . If you have tried the second version and wouldn't get it to work, it's the same issue.


Form is loading...