diff options
Diffstat (limited to 'files/common/www')
-rwxr-xr-x | files/common/www/redirection/redirect | 13 | ||||
-rwxr-xr-x | files/common/www/service/cgi-bin/redirect | 8 |
2 files changed, 13 insertions, 8 deletions
diff --git a/files/common/www/redirection/redirect b/files/common/www/redirection/redirect new file mode 100755 index 0000000..41b4eef --- /dev/null +++ b/files/common/www/redirection/redirect @@ -0,0 +1,13 @@ +#!/bin/sh + +read url reftrans < /tmp/redirection_target +if [ -x "$reftrans" ]; then + url="$url$($reftrans "$HTTP_HOST$REQUEST_URI")" +fi +echo -e \ +"Cache-Control: no-cache, max-age=0, no-store, must-revalidate\r +Pragma: no-cache\r +Expires: -1\r +Status: 302 Temporary Redirect\r +Location: $url\r +\r" diff --git a/files/common/www/service/cgi-bin/redirect b/files/common/www/service/cgi-bin/redirect deleted file mode 100755 index 9b417db..0000000 --- a/files/common/www/service/cgi-bin/redirect +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -echo -en "Cache-Control: no-cache, max-age=0, no-store, must-revalidate\r\n" -echo -en "Pragma: no-cache\r\n" -echo -en "Expires: -1\r\n" -echo -en "Status: 302 Temporary Redirect\r\n" -echo -en "Location: http://"`uci get network.mesh.ipaddr`"/cgi-bin/splash?"`/bin/urlencode "$HTTP_HOST$REQUEST_URI"`"\r\n" -echo -en "\r\n" -exit 0 |