Router: domain-based routing

Open
#214 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
typescript
Domain
frontend, web-dev

Research direction

Start by tracing the existing and entry points and how route matching exposes the current URL. Define how a domain-aware route such as should coexist with the default , then verify that different domains select LocalizedPage or DefaultPage as intended.

Written by the indexing model from the issue text.

Description

enhancement

It would be great to have support for domain-based routing.
I need to be able to server different pages on different domains.

Could it be configured via additional sub-component of <Routes> maybe?

<Routes>
  <DomainRoutes domain=":language.example.com">
    <Route path="/some-page" component={LocalizedPage} />
  </DomainRoutes>

  <Route path="/some-page" component={DefaultPage} />
</Routes>
Dominant language
TypeScript
Stars
1.3k
Forks
180
Avg merge
1d 13h
Merged PRs (30d)
19

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from solidjs/solid-router

All issues in solidjs/solid-router

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.