Skip to content

Commit 30e9363

Browse files
authored
Update uri.sh
1 parent bdaefd8 commit 30e9363

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/uri.sh

+3-5
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,18 @@ Redirect() {
2222

2323
## for browser-based redirects
2424

25-
URL=${1:-}
26-
27-
case $URL in
25+
case $1 in
2826

2927
back|refer)
3028
TARGET=${HTTP_REFERER}
3129
;;
3230

3331
*)
34-
TARGET=${URL}
32+
TARGET="/${1}"
3533
;;
3634

3735
esac
3836

39-
echo '<html><meta http-equiv="refresh" content="0; URL=/'"${TARGET:-}"'" /></html>'
37+
echo '<html><meta http-equiv="refresh" content="0; URL='"${TARGET:-}"'" /></html>'
4038

4139
}

0 commit comments

Comments
 (0)