Question about splitting a website and the use of only one pulse3

Hello,
This question is about a website I made some years ago. I installed pulse3. Now there is a need to split the site into 4 important branches, and I would like to have them all their own index in a subfolder with absolute paths to the css-es etc. , do I need 4 pulses extra then…? I guess so he? Hmmm. Is there anything else I can think of? Its not the money, but all those logins etc…Does anyone have a tip?
Bye!
Mary

Hi Mary,

I remember that older licenses allowed a maximum of three sub-domains.
So I guess it’s fair that if you have older licenses and split your site into sub-domains, that you need only one or two extra licenses. It’s unclear to me what the exact dates are that the licenses have been changed and if the changes apply to previously bought licenses.

I can’t remember if multiple installs on the same domain were covered with the old license.
So that remains a good question!

Brian

I looked it up. Three copies were allowed on the same domain, including sub-domains.

Dag Mary,

Can you please show us the desired url’s you would like to have for those 4 branches.
Subdomains or Subfolders ?

In case of Subdomains like branch1.domain.com you will need per branch and the root a Pulse install.

In case of Subfolders like www.domain.com/branch1/, www.domain.com/branch2/ etc you can implement this perfectly in version 4. Per branch a subfolder for the Pulse Pages. Per branch you might consider a seperate template/layout file. All templates can share the same CSS-es. You will need only one license and 1 login.

I tried my Pulse Pages subfolder solution in version 3, but that does not seem to work.

Groeten
Arnoud

Thanks Brian! I didn’t know that. But still…there will be 5 logins and that’s a lot for one site…I was hoping there was a way to have only one pulse but that can be achieved only with absolute include-urls’ I guess, that’s not the best solution…

Hello Arnoud,
Thanks! In subfolders, I am only still not comfortable with the use of templates…too bad, I know…

Hello Mary,

Your question was nagging me the last few days.

When you talk about not being comfortable with templates, does that mean that you use only BLOCKS with version 3 ? If that is the case then you can implement your multi-branch website with Pulse version 3 without the use of templates.

You can put the BLOCK EMBED codes in a PHP file at ANY level in a webserver subfolder structure. Like www.domain.com/branch1/index.php

<?php include_once($_SERVER["DOCUMENT_ROOT"]."/pulsepro/data/blocks/branch1-header.html"); ?>

For more clarity you can put the Blocks per branch in seperate Blocks subfolders.

Create like you normal do your PHP pages and EMBED the BLOCK codes. To create a branch, you create a subfolder on the server where you put your PHP files for each branch. All PHP files can share the same CSS-es. You will need only one Pulse license and 1 login.

Hope this helps
Arnoud

Hi Arnoud,
That’s what I thought of too, but in the old days (!) with the other shipstearer and when I just started wilt pulse I was told that that wasn’t possible. Now I guess they said that because of the generated embed code, but I can change the path offcourse.
Thanks, I will do that. Its is still one domain.
Bye!
Mary

1 Like

How is this possible… I just tested an include in the index-page of the seperate folder. And voila, it showed up, perfectly fine. Pulse seemes to be so clever to put an extra / in front of the whole pulsepro-include all of a sudden! So instead of /pulsepro/blocks/tandarts/blabla.html now it is //pulsepro/blocks/tandarts/blabla.html and that makes the path relative I learned!
But I don’t get it. I already put all the html in includes and they all have only one / untill now…Magic…?
Maybe it has to do with do a .htaccess-trick to make the 404 page show up in every subfolder.
Anyway, another step forward!
Still confused but happy!

Hmmm, I guess I learned something new about document-root things…that’s the downside of being 100% selftaught…:flushed:!

This can be quite easy of implement.

Example: Call content folder using server name, then all templates will be shared across your websites but the content will be different.

Or call templates based on server name too. Point all websites to the same Pulse installation and done. 1 hosting, 5 parked domains and magic!

1 Like

Too bad I didn’t know that a few years ago, two sites on one domain, both in two languages, I installed 4 pulsecms’s…I did ask, but the former owners said that could’nt be done.

You can achive this by using:

$_SERVER['SERVER_NAME'];

Example: https://www.barrahome.org/test/index.php

<?php
$host = $_SERVER['HTTP_HOST'];
$name = $_SERVER['SERVER_NAME'];
echo 'Server name is '.$name.' and server hostname is '.$host.'';

so you do something like:

<?php
$host = $_SERVER['HTTP_HOST'];
$name = $_SERVER['SERVER_NAME'];

echo 'Server name is '.$name.' and server hostname is '.$host.'';

echo '<hr />';

if($_SERVER['SERVER_NAME'] == 'www.barrahome.org'){
  echo 'I will serve content for www.barrahome.org';
} else {
  echo 'I will serve content for another website';
}

For the language detection… can be done by using a default language or fallback to default language if the other language isn’t found.

<?php
$host = $_SERVER['HTTP_HOST'];
$name = $_SERVER['SERVER_NAME'];
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);

echo 'Server name is '.$name.' and server hostname is '.$host.'';
echo '<hr />';
echo 'Client language is '.$lang;
echo '<hr />';

if($_SERVER['SERVER_NAME'] == 'www.barrahome.org'){
  echo 'I will serve content for www.barrahome.org';
  if($lang == 'es'){
        echo '<p>I will speak spanish</p>';
  }
} else {
  echo 'I will serve content for another website';
}

As you see anything is possible.

1 Like

This topic was automatically closed after 24 hours. New replies are no longer allowed.