Skip to content

Commit 315759d

Browse files
authored
Update uri.sh
1 parent e016dc6 commit 315759d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/uri.sh

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

2323
## for browser-based redirects
2424

25+
TARGET=${1:-}
26+
2527
case $1 in
2628

2729
back|refer)
2830
TARGET=${HTTP_REFERER}
2931
;;
3032

3133
*)
32-
TARGET="${1}"
34+
TARGET="/${TARGET}"
3335
;;
3436

3537
esac
3638

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

3941
}

0 commit comments

Comments
 (0)