IP Address Redirection (using JavaScript Or PHP?)

May 8, 2007

Right now what I have is an .htaccess file which blocks users not on my ip address list. But what I really want is a filter that will gather the ip address of the viewer, compare it against the server's ip address list, and redirect the viewer to a certain other link based on the viewer's ip address.

example:
user types in www.example.com, and according to ip address, is redirected to their own personal subdomain:

192.168.0.1 > mark.example.com
192.168.0.2 > john.example.com
192.168.0.3 > jerry.example.com
192.168.0.4 > tank.example.com
127.0.0.1 > zomgpwned.example.com

...and so on and so forth. Does anyone know how to do that?

View 2 Replies


ADVERTISEMENT

Javascript In Address Bar

Jul 23, 2005

I know you can use javascript in the address bar to display alert
messages and misc. stuff like that. But when I try and control some forms it loadsa a new page for the loaded example...

eg.

javascript: document.forms[1].elements[1].checked=true;

would load a blank page with 'true' written on it, is there a way to make
the checked box checked through this method?

View 1 Replies View Related

Get Client Mac Address With Javascript

Nov 29, 2005

How can i get client mac address OR hdd id with javascript for internet explorer?

View 6 Replies View Related

How To Obtain Server IP Address Using Javascript

Jul 23, 2005

Is it possible to get the Server IP Address from Javascript

ie., when the user types "http://10.0.0.10/main.htm" in the web
browser, i need to retrive the value of the IP Address(10.0.0.10) from
my client side javascript.

View 2 Replies View Related

How To Fetch A File From A URL Address With Javascript?

Jul 20, 2005

I wish to know it is possbile to fetch a file (its textual or graphical content) with a http type address.

Also where I can find the object, keyword, functions reference of JavaScript..

View 1 Replies View Related

Javascript Validation For Email Address

Jan 29, 2007

what is the javascript validation for the email address like
php.ycho@gmail.com

i used the simple validation like
"^w{1,}@w{1,}(.w{1,}){1,}$"

which works well for php@gmail.com but doesnot work for php.ycho@gmail.com
can anybody make a modification to above pattern to work for php.ycho@gmail.com

View 7 Replies View Related

Javascript Checking Email Address

May 1, 2002

I need a simple js function that will check if the value (an email address) in two text fields match.

If someone enters creole@creole.com in "fieldOne" and creoel@creole.com in field two it would throw an error. If they matched, the form would submit silently.

Can someone help me out? I think it should be easy, and I'm trying to do it myself, I'm just not good enough at js.

View 21 Replies View Related

Adding The Link Address To Outlook Express Address Book

Mar 16, 2011

i want to add the link address when clicked on the link in web page to the outlook express address book when the outlook window populates. i tried to put

<a href="mailto:enquiry@mydomain.com" > click here </a>

but it only add address to the To section of outlook window, i want it should store the address in the address book.. of outlook express..

View 1 Replies View Related

Getting URL Address From The Address Bar To Flash App Embedded Using SWFObject

Jul 14, 2010

I have been looking for a solution for a long time. I have embedded a SWF app in html page using SWFObject. Now I need to give the Flash app the address where it is currently embedded, since the same SWF file is embedded in more than one locations! So the Flash app is supposed to pull the right content according to its current position

View 9 Replies View Related

Redirection

Aug 24, 2006

I have a site in Dutch and (a translation) in English, say www.dutch.nl and www.english.nl. A Dutch site, say www.fools.nl, has a link to www.english.nl. I want this to be changed into www.dutch.nl, but the site never updates. How can I inmediately redirect the visitors of www.fools.nl to www.dutch.nl, without using php.

View 2 Replies View Related

Automatic Redirection.....

Jul 23, 2005

I am setting up a web page to collect some data via a questionnaire.
The questionnaire part is working fine, but I need some help with one
part. I have two different versions of the questionnaire (basically
just different orders of questions) and would like the users to be
redirected to one of the two versions. The idea I had was to have a
redirection page that simply had a web page counter on it (like so many
pages have now days) and based on this counter, people would
automatically be redirected to one of the two versions of my
questionnaire. Basically, if the counter was odd, the person would be
routed to version 1 and if even, they would be routed to version 2. I
thought this would be similar to redirecting people based on the type of
browser they are using or their language settings. However, I was
recently told there is not a way to do what I proposed above. So, this
leaves me with two questions:

1. Was the advice that I received accurate in stating that having a
simple script to redirect the user based on a web page counter is not
possible?

2. If so, does anyone have some advice as to how I could go about
automatically redirecting people to one of two web pages?

View 1 Replies View Related

Redirection Script

Dec 15, 2001

can anyone give me a simple redirection script? something suitable for "You'll be taken to this page in 5 seconds... if not you can click on this link"

i did a search at hotscipts but turned out lots of complicated scripts...

View 5 Replies View Related

Automatic Redirection

Aug 13, 2000

Does anyone know how to make a page redirect to another page after a given time? I am using a FREE ISP so i do not have ASP etc. I only have JAVA Script and HTML.

View 7 Replies View Related

Auto-redirection

Feb 5, 2003

I have a drop down list and i want each time i select a value to get redirected to that page.

View 1 Replies View Related

Creating Redirection Url From Form?

Mar 2, 2011

I'm a non-web programmer being forced to do some web programming.

My immediate problem is that, on submission of a form, I need to be able to open a url (that I control) with the filled-in form values appended to the new url. In other words, I need to be able to do the equivalent of :

<form>
<input name="key1" type="text"/>
<input name="key2" type="text"/>
<input type="button" value="Submit" onclick="window.open('http://new.domain.com/newpage.html?key1=val1&key2=val2')"/>
</form>

I would really like to do this without server-side code.

View 2 Replies View Related

JS Redirection That Redirects Whole Page

Jan 19, 2007

My script that uses location.replace(); only makes the textarea box to redirect. I want it to redirect whole page. How do I do that?

View 8 Replies View Related

Mozilla Redirection Script?

Dec 7, 2003

I need a redirection scrtipt that will work in IE, Mozilla & Netscape... The current tag that im using:

<META HTTP-EQUIV="Refresh" CONTENT="10; URL=http://www.my-site.com">

works great in IE but nothing happens in Mozilla.

View 1 Replies View Related

Browser Redirection Script

Oct 25, 2001

I'm looking for a browser redirection script that will send you to another page if you're not using IE 5+ or Netscape 6. Does anyone know where I can find one?

View 24 Replies View Related

Drop Down List And Redirection

Jan 24, 2003

I have a drop down list which contains 5 cities like NY, Paris....

When the user selects a city and press Go button i want the user to be redirected to the url of the city he selected.

View 2 Replies View Related

Identifying Redirection On Unload ?

Oct 21, 2010

Its like xyz.com/index.html is hosted under us and it can be edited by many people. Some spammers edit the above index.html to javascript redirect to abc.com. I want to figure out this pages in my site xyz.com .Is there any way to track the abc.com domain on unload of the page xyz.com . Please let me know if you need any more information.

View 1 Replies View Related

Redirection Of An HTML Page

Oct 28, 2010

I'm looking for a solution (without success)to a redirection problem from a Javascript function.I'm currently in test on a local network, and I have installed Apache on a workstation whose IP address is 192.168.0.3 (in fact I installed EasyPHP).From a laptop, I can connect to the Apach server without any problem and get all HTML pages (even PHP built pages) I want.My only problem is when I try to redirect an HTML page with relative URL from a javascript function. This JS function is not of my own,I just adapted it to my environment.I'm using it because I need to send information of the user screen sizes to the server. This works pretty well when I run a browser on the server. But it fails when I try from my laptop.In fact I got the message saying "It can't connect to localhost".

View 1 Replies View Related

JQuery :: Changing HRef Value For Redirection

Dec 7, 2011

I have external links on my website which are added by users of the system. I want to do the following:
1) Change the HREF value via jquery of any external hyperlink to be a page on my site that opens in a new window
2) This page will be a 'Please wait, we are redirecting you to your chosen website
' kind of page
3) This page then redirects the user to the URL they clicked after a couple of seconds

I thought of doing something like the following:
$('a[href^="http://"]').attr({target: "_blank", title: "Opens in a new window", href: "/redirect/"+$(this).href});
So the idea being that I open all external URLs in a new window but I load a page called /redirect (which is my own page) but I pass to it the URL I want to redirect too.

This is not working as each time I click my link my URL is:
/redirect/undefined

View 1 Replies View Related

JS Redirection Shows Alternate Text

Jan 27, 2011

I have a javascript redirection with an alternate text for those who have javascript disabled.

It all works fine but before redirection the alternate text displays shortly. Can I prevent that?

Code:

I also tried to hide the text with an onload event, but nothing changes

View 3 Replies View Related

Page Redirection Upon Cookie Recognition?

Mar 10, 2011

I want to write a javascript program which will redirect the user from a welcome page to an an intro page when a cookie is found. If there are not cookies found, the welcome page is loaded but a cookie is written so that next time the user visits the page, he will be redirected to the intro page automatically.This program would allow only new visitor to view the welcome page and other visitors to skip the welcome page to be brought to the intro page right away.

window.onload = pageInit;
function pageInit(){
var visited = "";

[code]....

View 1 Replies View Related

How To Hide The Redirection Code In This Form

Jun 15, 2011

I am trying to figure out how to hide the direction page in this code:I want to hide: www.ipage.com/mail/index.bml

<INPUT TYPE="submit" NAME="Log In"
VALUE="Check Mail"
onclick="javascript:login.action='http://www.ipage.com/mail/index.bml?s=1';

[code]....

View 5 Replies View Related

Simple Form Redirection Script

Sep 9, 2005

I have a problem with a Javascript dropdown form that is supposed to redirect users to the site that is selected. It works fine in IE, but it supposedly doesn't work in Firefox.

If anyone here can point out what is wrong with this code, I would appreciate it. Also, if there is any way to compact the code down or make it cleaner, that would also be appreciated.

<script type="text/javascript">
<!--
function goto(form) { var index=form.select.selectedIndex
if (form.select.options[index].value != "0") {
location=form.select.options[index].value;}}
//-->
</script>

<form name="nav_form">
<select name="select" size="1">
<option value="">Select a Site
<option value="http://www.sitepoint.com/" />Sitepoint
</select>
</form>

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved