MacApache Posted March 28, 2008 Share Posted March 28, 2008 Hello. I'm using Apache 2.2.6 on a Mac as the server. I have all static content on the site. I have the server set up on the LAN with a static IP. There is NO internet access for this LAN. Everything is LAN inclusive. Clients connect to a router and the router redirects all traffic to the web server IP. That part works fine. The router is acting as DNS. I would like for the clients to be able to connect to the router, and no matter what is in their initial homepage, whenever they open their web browser, assuming it has something set other than a blank page, it is redirected to the web server site on the LAN. I've seen web sites that just change the URL in the web browser once you get to the site, redirecting you to a completely separate domain. Maybe that's what I need. I'm not sure how to do that. For example, the web server is on 192.168.1.253, named http://insideserver/ and a client connects to the router, gets an IP, and tries to connect to http://www.google.com. I'd like that to be redirected to http://insideserver/ Things like http://insideserver/thisisnotarealfile.html I would also like to be redirected to http://insideserver/ But once the client is at http://insideserver/ (at index.html), I'd like for them to be able to browse around to different files and folders there, as long as those files and folders exist. I am at a loss at to where I should go. I've confirmed that the router is redirecting clients to 192.168.1.253, but I am not sure exactly what in httpd.conf I need to change. I've tried things like 404 redirects to http://insideserver/ and RedirectMatch, but they aren't working all the time. Please help. Thanks! Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted March 28, 2008 Share Posted March 28, 2008 Do you mean you want to redirect all users who try to go to external sites such as google.com they will get redirected to your internal server? Quote Link to comment Share on other sites More sharing options...
MacApache Posted March 28, 2008 Author Share Posted March 28, 2008 Do you mean you want to redirect all users who try to go to external sites such as google.com they will get redirected to your internal server? Yes. That, and any non-existent URLs to the internal server should be redirected to the main index.html. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.