Match
In switchhoster
, the match is the core unit in the collection that defines the target URI that the current collection can use for switching. By creating multiple matches, you can quickly switch to the specified URI
to suit different work scenarios.
Describe
- Name: Provide a concise name for the match to help you quickly identify the role of each match. For example, you can use subdomains for naming.
- Target URI: Defines the target URI after switching. Currently, only the
http
orhttps
protocol is supported. If the scheme is not specified, the default value ishttp
.
Scheme omission policy
If the input target URI does not contain scheme
, http
is used by default, that is, https
is supported by default to switch from https
to http
.
Switch https
in https
If you still want to omit scheme
, you can choose to configure force https
in the reverse proxy or enter the desired scheme
in the target URI option.
Example
www.example.com
will be completedhttp://www.example.com
.
Example
Suppose your current URI
is https://www.example.com/page?source=google ,and created 3 matches:
Match Name | Target URI | Switch result |
---|---|---|
www | www.domain.com | No response |
sub | sub.domain.com | https://sub.domain.com/page?source=google |
dev | localhost:3000 | http://localhost:3000/page?source=google |
TIP
MacOS
users can switch through the shortcut key Option ⌥ + Tab
.
Windows
and other operating system users will use the Ctrl + Tab
key to complete the switch.
Operations
You can perform the following operations on matches to manage and modify matches:
- Create: Create a new match item to the current collection, specifying the match item name and target URI.
- Delete: Deletes the current matching item. This operation cannot be undone. Please confirm before you proceed.
- Save: Saves the changes made to the current matching item to ensure that the changes are updated.
- Discards: Discards all current edits to the matches and returns to the matches list page.