How to setup a website with multiple sub-domains but one canonical domain

I want to serve an website via https://the.example.com (thus with a non-standard sub-domain), but the same website should also be entered with https://example.com and https://www.example.com (+the http counterparts). So if you type https://www.example.com/page you should be redirected to https://the.example.com/page, and if you type http://example.com/page you should be redirected to the same page. I made this…

Details

mosquito_sub to jq get value

I have MQTT mosquitto_sub running on linux bash that outputs this JSON data received from power plug: #mosquitto_sub -t stat/sensors/# | jq -r ‘.’ { “Status”: { “Module”: 52, “FriendlyName”: [ “stecker2” ], “Topic”: “sensors”, “ButtonTopic”: “0”, “Power”: 0, “PowerOnState”: 3, “LedState”: 1, “SaveData”: 1, “SaveState”: 1, “SwitchTopic”: “0”, “SwitchMode”: [ 0, 0, 0, 0,…

Details

Accessing Text Keyword Field through a Script

I am trying to do some scripting in elasticsearch Here is an example of the JSON segment in the request. { “script_score”: { “script”: { “source”: “doc.containsKey(‘var’)?params.adder[doc[‘var’].keyword]:0 “, “params”: { “adder”: { “type1”: 1, “type2”: 1000 } } } }, “weight”: 100000 } This is the error that is thrown { “shard”: 0, “index”: “”,…

Details