Yun REST Calls - URL Redirect

Hello - my question is in regards to the Arduino Yun REST API. Using the Bridge example (partially pasted below), I can use the URL “http://myArduinoYun.local/arduino/digital/13/1” and the webpage displays “Pin D13 set to 1.”

My goal is to then redirect that page to another URL “” after 5 seconds. Whether I use an HTML meta refresh tag (below), JS, or some other method, I don’t know how I could redirect the page after the REST call. With my custom webpages loaded to the SD card I can simply place the meta refresh tag in the section, but since “http://myArduinoYun.local/arduino/…” is not my own webpage, I do not know where I could invoke the redirect.

I’ve tried modifying the /etc/http.conf file (, using curl and wget through the terminal to change the header of “http://myArduinoYun.local/arduino/…”, and a variety of other methods, but have been unsuccessful.

Thank you in advance,

Example HTML Code:

Arduino Yun Bridge Example (partial):
#include <Bridge.h>
#include <BridgeServer.h>
#include <BridgeClient.h>

BridgeServer server;

void setup() {
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
digitalWrite(13, HIGH);

void loop() {
BridgeClient client = server.accept();
if (client) {
void process(BridgeClient client) {
String command = client.readStringUntil(’/’);
if (command == “digital”) {

void digitalCommand(BridgeClient client) {
int pin, value;
pin = client.parseInt();
if ( == ‘/’) {
value = client.parseInt();
digitalWrite(pin, value);
} else {
value = digitalRead(pin);
client.print(F(“Pin D”));
client.print(F(" set to "));
String key = “D”;
key += pin;
Bridge.put(key, String(value));