119 users online (1 members and 118 guests)  

  Results 1 to 2 of 2


  1. What Redirection Code    Forum: HTML Forum
    Replies: 1
  2. Redirection after form submission    Forum: CGI Perl Forum
    Replies: 3
  3. Domain Name Redirection Code    Forum: HTML Forum
    Replies: 2
  4. Need help with Permanent Domain Redirection    Forum: Search Engine Optimization - SEO - Forum
    Replies: 2
  1. #1
    osecrown's Avatar
    New User

    Join Date
    Aug 2007

    PHP Redirection Question

    I am at a bind of how to make
    my PHP Redirection to an affiliate
    product page work.

    This is what I know and have done:

    Created a folder called "recommend"

    Opened and saved a notepad file in the
    "recommend" folder which I named "index.php"

    The only content in the "index.php" is

    header("location:http: // www. xxx . com");

    The XXX.com is replaced with my affiliate

    I uploaded the "recommend" folder
    with the index.php inside. When I access it
    from the browser through XXX.com/recommend,
    it does not take me to the affiliate page. In short
    it does not work.

    Please what am I missing out? Is the above code
    complete, or there more coding to make it work

  2. #2
    Yesideez's Avatar
    New User

    Join Date
    Aug 2010
    Devon, UK

    Re: PHP Redirection Question

    Do you get an error message?

    You might have some spaces in the wrong places - here's how I'd write it:
    header('Location: http://www.somesite.com/');

    Save that as a plain text file - if you're using Notepad that comes with Windows I highly suggest you stop and get a decent editor like Notepad++

    Notepad with Windows can and does place strange random characters on the end of files. Invisible to use but at some times can cause scripts to malfunction.