How to Create a Site Splice
Web Controls enable you to use pre-defined security and performance rule sets. Rule sets minimize the need to discover, define, and maintain a large number of individual rules. Instead, you can create rule sets that match individual request or response conditions and execute a set of actions predefined in the Webscale Control Panel. Based on the conditions, Web Controls automatically execute a set of pre-defined actions after all conditions are met. Through Web Controls, you can create complex sequences of actions.
Site Splice allows you to build a website from multiple sources, such as microsites, multiple backends, canned content, and more. Use the Use Alternate Backends Web Control action to configure Site Splice, and to rewrite the source URL for SEO or other purposes. Some common use cases for using Site Splice include loading assets from an Amazon S3 bucket, or using Webscale Image Manager. Use Alternate Backend is a final action. Final actions always run last; the order of execution of other actions is unspecified and not necessarily in the order displayed.
To follow these instructions, log into Webscale Control Panel and click the three vertical dots menu of the application box.
On the menu that appears, click Edit.
Prerequisite
Since you’re setting a Web Control, we recommend reading How to Create Web Controls before following these steps.Create the Use Alternate Backend action
After you’ve created the Condition for which this Web Control action applies, click + Add action to create an action for the new Web Control, which opens the Create Action dialog. To proceed, click Select an Action.
A list of actions is now displayed. Select Use Alternate Backends to proceed.
The configuration choices listed are:
- Cluster - If you have any clusters defined for your application and wish to apply this web control for one of them, select the cluster here.
- Servers/Hostname- To use an IP address, select Servers and enter the IP. To use a hostname or domain name, select Hostname and enter the domain name.
- Show URL Mapping - Click Show URL Mapping to set this option. URL mapping allows you to change the request URL before a request is made to a backend server. Choices are:
- Remote URL - Used to access backend servers. This URL may omit the scheme. If the scheme is set, then that scheme will be used to access the backend server regardless of the request scheme. When a hostname is provided in the URL, then it will be used instead of the request hostname. If a path is provided, the pathname requested from the backend server will be the path formed by joining the URL path and the request path. See the table below for examples.
- Relative To - The path in the URL space of the application at which the resources obtained from the backend server are mapped. If the request url path does not begin with Relative To then the results may be unpredictable. The path mapping logically happens before any mapping performed by the Remote URL attribute. To sum up, anything added in the Relative To field will be removed from the URL when making the request to the alternate backend. See the table below for examples.
Note:
Static files are cacheable, so if you’re using Site Splice to load static assets don’t forget to create a Dynamic Site Cache rule to cover those assets. Use the Remote URL as the URL for the cache rule to match.Remote URL Setting Examples
Request URL | Remote URL | Effective URL |
---|---|---|
https://example.com/page |
— | https://example.com/page |
https://example.com/page |
/prefix |
https://example.com/prefix/page |
https://example.com/page |
//althost.com/ |
https://althost.com/page |
https://example.com/page |
//althost.com/prefix |
https://althost.com/prefix/page |
https://example.com/page |
http://althost.com/prefix |
https://althost.com/prefix/page |
Relative To Setting Examples
Request URL | Relative to | Effective path |
---|---|---|
/ |
— | / |
/base |
— | /base |
/base |
/base |
/ |
/base/page |
/base |
/page |
Note:
If you’re not sure what Remote URL to use or how to use the Relative To setting, please contact support.Further Reading
- Web Controls
- How to Block Countries from Accessing Your Site
- How to Configure and Flush the Site Cache
- How to Use a URL Map for Redirects
Have questions not answered here? Please Contact Support to get more help.
Feedback
Was this page helpful?
Glad to hear it! Have any more feedback? Please share it here.
Sorry to hear that. Have any more feedback? Please share it here.