Skip to content

FEATURE: Adds support for multisites via subpaths (path_prefix)#39

Closed
Alteras1 wants to merge 4 commits intomainfrom
feature/multisite-by-subpath
Closed

FEATURE: Adds support for multisites via subpaths (path_prefix)#39
Alteras1 wants to merge 4 commits intomainfrom
feature/multisite-by-subpath

Conversation

@Alteras1
Copy link
Copy Markdown

@Alteras1 Alteras1 commented Apr 6, 2026

This adds support for multisite via subpaths, specifically for sites that share the same hostname but use different URL subpaths (example.com/site-a vs example.com/site-b)

Configuration

Sites can declare a path_prefix in the config/multisite.yml config file. If none is provided, it will only use the host name.

site_a:
  host_names:
    - example.com
  path_prefix: /site-a

The subpath for the default site db can be configured with config.multisite_default_path_prefix

# application.rb
config.multisite_default_path_prefix = "/default"

Alteras1 added 4 commits April 6, 2026 16:04
This adds support for multisite via subpaths, specifically for sites that share the same hostname but use different URL subpaths (`example.com/site-a` vs `example.com/site-b`)

## Configuration

Sites can declare a `path_prefix` in the `config/multisite.yml` config file. If none is provided, it will only use the host name.
```yaml
site_a:
  host_names:
    - example.com
  path_prefix: /site-a
```

The subpath for the default site db can be configured with `config.multisite_default_path_prefix`
```ruby
# application.rb
config.multisite_default_path_prefix = "/default"
```
@Alteras1 Alteras1 closed this Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant