PHPackages                             b13/host-variants - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. b13/host-variants

ActiveTypo3-cms-extension

b13/host-variants
=================

Extends the base variants condition with current host.

1.3.0(1y ago)34310.6k—6.4%5[1 issues](https://github.com/b13/host_variants/issues)2GPL-2.0-or-laterPHP

Since Jun 25Pushed 1y ago9 watchersCompare

[ Source](https://github.com/b13/host_variants)[ Packagist](https://packagist.org/packages/b13/host-variants)[ RSS](/packages/b13-host-variants/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (7)Used By (2)

EXT: host\_variants
===================

[](#ext-host_variants)

This extension allows to configure a base variant in TYPO3s Site Configuration depending on the current Host.

When is it useful?
------------------

[](#when-is-it-useful)

This extension can be useful when dealing with multiple sites in one TYPO3 instance with different domains:

Let's say you have a primary domain `primary-domain.tld` with a site configuration. Backend editors log in to this primary domain.

You have a site config with an own page tree for a second domain `another-domain.tld`. Editors create content for the second domain on a hidden page. When previewing that page from within the backend, `another-domain.tld/some-page-slug` will be shown. Since editors are logged in to the primary domain, the backend user cookie will not be sent by the browser for the secondary domain, the frontend does not see a logged in backend user and will show a 404.

The extension now allows configuring a site base variant for the secondary domain that kicks in when backend preview is called from the main domain, and calls the frontend of the secondary site as a sub path of the main domain instead.

Requirements
------------

[](#requirements)

- TYPO3 v11 LTS, v12 LTS or v13 LTS

Installation and Setup
----------------------

[](#installation-and-setup)

Install the extension via your preferred way. No further setup is required. The extension works out of the box.

What it does
------------

[](#what-it-does)

The extension adds a variable `host` to the expression language for the Site Configuration. This allows configuring multiple domains for the same root page.

Example
-------

[](#example)

Basic:

```
base: 'https://another-domain.tld/'
baseVariants:
  -
    base: 'https://primary-domain.tld/some-sub-path'
    condition: 'host == "primary-domain.tld"'
```

Using some ENV variable:

```
base: 'https://another-domain.tld/'
baseVariants:
  -
    base: 'https://%env(MAIN_DOMAIN)%/some-sub-path'
    condition: 'host == "%env(MAIN_DOMAIN)%"'
```

Combining conditions:

```
base: 'https://another-domain.tld/'
baseVariants:
  -
    base: 'https://local1.local/'
    condition: 'applicationContext == "Development" && host == "local1.local"'
  -
    base: 'https://local2.local/'
    condition: 'applicationContext == "Development" && host == "local2.local"'
```

---

*Made by [b13](https://b13.com) with ♥*

[Find more TYPO3 extensions we have developed](https://b13.com/useful-typo3-extensions-from-b13-to-you) that help us deliver value in client projects. As part of the way we work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~529 days

Total

4

Last Release

563d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/165630?v=4)[Benni Mack](/maintainers/bmack)[@bmack](https://github.com/bmack)

![](https://avatars.githubusercontent.com/u/7824856?v=4)[Daniel Goerz](/maintainers/ervaude)[@ervaude](https://github.com/ervaude)

---

Top Contributors

[![ervaude](https://avatars.githubusercontent.com/u/7824856?v=4)](https://github.com/ervaude "ervaude (12 commits)")[![bmack](https://avatars.githubusercontent.com/u/165630?v=4)](https://github.com/bmack "bmack (3 commits)")[![alexanderschnitzler](https://avatars.githubusercontent.com/u/711459?v=4)](https://github.com/alexanderschnitzler "alexanderschnitzler (2 commits)")[![davidsteeb](https://avatars.githubusercontent.com/u/3862523?v=4)](https://github.com/davidsteeb "davidsteeb (1 commits)")[![jschlier](https://avatars.githubusercontent.com/u/9108576?v=4)](https://github.com/jschlier "jschlier (1 commits)")[![lolli42](https://avatars.githubusercontent.com/u/2178068?v=4)](https://github.com/lolli42 "lolli42 (1 commits)")

---

Tags

typo3-extension

### Embed Badge

![Health badge](/badges/b13-host-variants/health.svg)

```
[![Health](https://phpackages.com/badges/b13-host-variants/health.svg)](https://phpackages.com/packages/b13-host-variants)
```

###  Alternatives

[fluidtypo3/vhs

This is a collection of ViewHelpers for performing rendering tasks that are not natively provided by TYPO3's Fluid templating engine.

1954.1M49](/packages/fluidtypo3-vhs)[in2code/powermail

Powermail is a well-known, editor-friendly, powerful and easy to use mailform extension for TYPO3 with a lots of features

982.5M38](/packages/in2code-powermail)[typo3/testing-framework

The TYPO3 testing framework provides base classes for unit, functional and acceptance testing.

675.0M775](/packages/typo3-testing-framework)[fluidtypo3/flux

The flux package from FluidTYPO3

152982.2k20](/packages/fluidtypo3-flux)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

96374.6k23](/packages/friendsoftypo3-content-blocks)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
