CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Other server side languages/ issues (http://www.codingforums.com/forumdisplay.php?f=9)
-   -   Redirecting A Requested Website To A Different One. (http://www.codingforums.com/showthread.php?t=275183)

Bal0rCIM 10-04-2012 08:17 PM

Redirecting A Requested Website To A Different One.
 
What I'm trying to do sounds pretty simple but I don't think it is. When you try to enter a website (for example google.com) instead of opening the actual site (google.com) it would open up another site or any other html code. And can this be done for an entire local area network (not just one computer)? I've been searching for quite a while now and I really want to know how to do it so, if anyone knows please share your knowledge.

Alex Vincent 10-06-2012 03:56 PM

I think you want one of the HTTP 300 series of response codes. HTTP 302 is a temporary redirect, for example.

Basically, a 302 tells the web browser that the page lives at another address, and what that address is. The browser does the redirect for you.


All times are GMT +1. The time now is 10:11 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.