Jump to content

annonshay

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

annonshay's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It Finally Works! Thank you SO MUCH!!! I feel stupid- I was trying to make it way too complicated...
  2. I've tried this: <? $sname = $_SERVER["HTTP_HOST"]; $sname = strtoupper($sname); if (instr($sname,"PRATTANDCO.COM") != 0) { response.redirect "prattandco.com"; } elseif instr($sname,"PRATTANDCO.NET") <> 0 then; response.redirect "prattandco.com"; } elseif instr($sname,"ROBERTPRATT.COM") <> 0 then; response.redirect "prattandco.com/page_id=9"; } elseif instr($sname,"ROBERTPRATT.NET") <> 0 then; response.redirect "prattandco.com/page_id=9"; } ?> and this: $sname=$_SERVER["SERVER_NAME"]; $sname=strtoupper($sname); if (_instr(0,$sname,"PRATTANDCO.COM",0) != 0) { header("Location: /"); } elseif (_instr(0,$sname,"PRATTANDCO.NET",0) != 0) { header("Location: /"); } elseif (_instr(0,$sname,"ROBERTPRATT.COM",0) != 0) { header("Location: /page_id=9"); } elseif (_instr(0,$sname,"ROBERTPRATT.NET",0) != 0) { header("Location: /page_id=9"); } function _instr($start,$str1,$str2,$mode) { if ($mode) { $str1=strtolower($str1); $str2=strtolower($str2); } $retval=strpos($str1,$str2,$start); return ($retval===false) ? 0 : $retval+1; } And a couple different variations of those but I don't think they're right... I've been pasting them at the top of my wordpress's home page. The second one I think almost worked- it showed that it was looking for the right file in the address bar, but it couldn't find it... I'm trying to convert from ASP, so I apologize for my stupidity
  3. Hi, Could someone please help me set up an easy redirect for my wordpress blog? I have 4 domains, I just want them to all redirect to the right place and I don't know how to do it. I'm still learning PHP so I don't know how to write it from scratch yet. "prattandco.com" should stay the same, "prattandco.net" should go to prattandco.com, "robertpratt.com" should go to "prattandco.com/page_id=9" and "robertpratt.net" should go to "prattandco.com/page_id=9" too. Thanks very much in advance!
×
×
  • 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.