OpenWrt Forum Archive

Topic: Redirecting a Webpage

The content of this topic has been archived on 2 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

How can I redirect a certain webpage URL to another?, I mean if I type www.example1.com in chrome, I want it to send me to www.example2.com. How can i do this?

add to /etc/hosts the line "ip-address-of-the-router www.example1.com", e.g: 192.168.1.1 www.example1.com and restart dnsmasq to load /etc/hosts.
and add as 404 error home page (not found) as html page redirection to www.example2.com in a local http server  (like lighttpd).

The discussion might have continued from here.