Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

if user type www.demo.com in address bar i want user to redirect to my affiliate link www.demo.com/?affid=omkar i tried many things but nothing helped me . Any Help Thanks in advance.

share|improve this question
1  
Are you asking for this behavior on computers (browsers) in your control? Or any one –  Dave Rook Sep 26 '13 at 15:57
    
it can be any thing redirection through browser extention or windows hostfile. –  Omkar Sep 26 '13 at 16:00
1  
The hosty file (on windows and on other OS's) works on host names. Thus that would give the same IP for www.demo.com/?affid=omkar as for www.demo.com/?affID=Whatever_I_type_here. –  Hennes Sep 26 '13 at 16:01
    
would you mind responding to your OP to let us know if my answer below worked for you or not? –  Richie086 Oct 3 '13 at 6:36
add comment

closed as unclear what you're asking by techie007, tapped-out, Moses, Carl B, Mokubai Nov 9 '13 at 7:19

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

Here is how to do it.

  1. Create a file called index.html and put it in the root of the directory that is hosting www.demo.com
  2. In index.html, enter the following code

<html>

<head><title></title>

<meta http-equiv="refresh" content="0, URL=www.demo.com/?affid=omkar">

</head>

<body>

</body>

</html>

this will cause anyone who goes to demo.com to be redirected automatically to www.demo.com/?affid=omkar

You can change the amount of time it takes to redirect the person by changing the content="0 to any non zero value.

share|improve this answer
    
I think he's aiming to do it on the client side... –  techie007 Sep 26 '13 at 16:31
    
What would be the purpose of doing this client side? Why would someone run something client side to redirect themselfs to some affiliate site when they visited his site? Just trying to understand why the redirect solution I posted would not be preferable. –  Richie086 Sep 27 '13 at 17:52
1  
I fully agree, but you'll have to bug the OP for that clarification. ;) –  techie007 Sep 27 '13 at 20:47
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.