Jump to content

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/98370-lan-redirects/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.