GithubHelp home page GithubHelp logo

wandl / multi-domain Goto Github PK

View Code? Open in Web Editor NEW

This project forked from silverstripe/multi-domain

0.0 2.0 0.0 66 KB

Allows multiple domains to access one CMS instance, mapping them to different sections of the hierarchy

License: MIT License

PHP 100.00%

multi-domain's Introduction

Multi Domains for SilverStripe

Allows multiple domains to access one CMS instance, mapping them to different sections of the hierarchy, which allows for vanity URLs. Examples:

  • example.com -> resolves to home page
  • example.com/shop/store -> Resolves to a Store page
  • example-store.com -> Shows content for example.com/shop/store.
  • example-store.com/checkout -> Shows content for example.com/shop/store/checkout

Requirements

silverstripe/framework:3.1.*

Configuration

Each domain is identified by a key. You must define one domain using the primary key to mark it as the primary domain.

---
Name: mymultidomain
After: '#multidomain'
---
MultiDomain:
  domains:
    primary:
      hostname: 'example.com'
    store:
      hostname: 'example-store.com'
      resolves_to: 'shop/store'

Options

allow_subdomains: If true, domain matching is subdomain agnostic, so that anything.example.com still maps to example.com, the primary domain in the above configuration.

Why not subsites?

Subsites creates a parallel CMS instance for a given domain name. This module allows you to map domains to a specific section of the hierarchy, in the context of all your other pages.

Why not "homepage for domain"?

That works to create a vanity URL for one page, but as soon as you go deeper into the hierarchy, you return to the native URL. A more robust solution is required for persisting the vanity URLs.

Further, this module is more extensible, allowing for collaboration with other URL-hungry modules, such as Translatable or Fluent.

multi-domain's People

Watchers

James Cloos avatar Joseph Blythe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.