http://c {
root /var/www
# First redirect
rewrite {
if {remote} starts_with 192.168.1.
to /long-url-1
}
redir /long-url-1 https://extremely-long-url/1
# Second redirect
rewrite {
if {remote} starts_with 192.168.2.
to /long-url-2
}
redir /long-url-2 https://extremely-long-url/2
}
I found the above code in forum. The code worked.
But my website is on Cloudflare and I installed realip plugin now.
how do I change {remote} to realip? many thanks again.