URL redirect in Tomato?

Discussion in 'Tomato Firmware' started by wutzin, Oct 12, 2008.

  1. wutzin

    wutzin Addicted to LI Member


    I would like to have Tomato alter the URL for certain websites:
    When someone on my network enters www.hostxyz.com, it should load www.hostxyz.com/thispage.htm instead.

    I know that I can use dnsmasq to redirect requests to a different IP address, but what do I do if I want to redirect to a different page on the same host?

    Any suggestions appreciated!

  2. fyellin

    fyellin LI Guru Member

    Tomato can't do this. However this should be pretty simple to do in the webserver of whatever machine is actually hosting your files.
  3. wutzin

    wutzin Addicted to LI Member

    hmm, too bad! I actually need the URL redirect for a host I don't own (e.g. Amazon, in order to automatically redirect to my Amazon associate page).
    So I guess I'm out of luck.

    But in principle this must be doable somehow, since lots of wifi routers redirect page requests to some 'terms of service' or login pages before one can go online... Was hoping this mechanism was available through some hack on Tomato as well...
  4. Mastec

    Mastec Network Guru Member

    Not a 100% positive but I think DD-WRT offers what you are looking for.
  5. fyellin

    fyellin LI Guru Member

    Actually, I now confess that I misread the question, but gave the right answer anyway. I thought you were asking about someone from the outside trying to read a page inside your LAN, instead of vice versa.

    I suspect you might be able to do what you want with some DNS hijacking. Having never done this before, I don't know whether it's easy or difficult. Tell DNS on the router that www.amazon.com is really the IP address of your internal web server, and then have that internal web server look for URLs of the /www.amazon.com/.... and redirect them to something that doesn't start with //www.amazon.com (or else you'll have an infinite loop).

    This is probably more work than it's worth.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice