Redirect Users

Joined
Oct 14, 2010
Messages
28
Reaction score
1
Points
3
Your Mac's Specs
MacBook Air 10.7, iMac 21" 10.7
I want to be able to send users to a different site whenever they try to access specific pages through my network. For example, when a user types in google.com they should be sent to localhost/abc.html. I only want this to occur on certain pages, though, and not all. I'm sure there's a way to do this, but Google was no use this time around.

Thanks in advance for any help!
 
Joined
Mar 16, 2007
Messages
756
Reaction score
14
Points
18
Do you have access to the user's hosts file? On a Mac it's located at /etc/hosts and can be edited via Terminal with the command:

sudo nano /etc/hosts

You can then add a line like:
google.com localhost/abc.html

If you you don't have access to the machines you'd do this through routing on your DNS server/firewall. More information about your network would be required to help our with that.

Hope that helps!
 
OP
S
Joined
Oct 14, 2010
Messages
28
Reaction score
1
Points
3
Your Mac's Specs
MacBook Air 10.7, iMac 21" 10.7
Yeah I'm an admin on my mac and could edit that file, but wouldn't that only redirect users that use my computer? When someone brings a laptop to my house, I need them to be redirected to the page, too.

Sorry for using localhost as an example above, I should have used an actual address. That probably made it confusing... Here's a better one: when someone browses to google.com it would send them to abc.com.
 
Joined
Mar 16, 2007
Messages
756
Reaction score
14
Points
18
Well, everybody accessing the internet through your network is going through your router. A DNS server resolves all requests (like "I want to see google.com") and forwards them to google's server. This means you would have to set up some sort of DNS server in your network and tell your router that everybody has to use this server when they connect to your network.

That's really hard or quite easy - depending on how good your networking knowledge is. Using Google and researching on how to set up a DNS server might be the best start. Good luck!
 
OP
S
Joined
Oct 14, 2010
Messages
28
Reaction score
1
Points
3
Your Mac's Specs
MacBook Air 10.7, iMac 21" 10.7
Thanks for pointing me in the right direction! I'm usually pretty tech savvy, hopefully I'll be able to figure this one out.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top