Tuesday 15 January 2013

exception - My desire: to continue to edit a redirected page -


Code used in the head:

  & quot; Meta charset = "UTF-8" & gt; meta http-equiv = "refresh" content = "1; Url = http: //example.com "& gt; & lt; script type =" text / javascript "> window.location.href =" http://example.com " 

The problem is, it is a universal redirect. When I adjust the html / css and click to see it, whether in my browser or just by clicking on the file to preview it, Redirects to (I YouTube is used as a test)

What Is there a way that I can redirect myself to all the visitors except myself so that I can see my progress alive?

I will filter the IP address of the user.

Obtaining IP with Java seems a bit difficult if you can, to put some lines of PHP on top of the file Try.

  & lt ;? Php if (! In_array (@ $ _ SERVER ['REMOTE_ADDR'], array ('127.0.0.1' , '123.123.123.123'))) {header ('location: http://www.youtube.com'); Go out; }? & Gt; 127.0.0.1 IP address is 'localhost' for your personal server on your computer. Find out what your public IP is and then enter the array. 

This is a similar question thanks to user xdazz for the answer.


No comments:

Post a Comment