url redirect ($20 paypal to the best solution)

Discussion in 'Programming' started by furious, Nov 22, 2009.

  1. broker

    broker Peon

    Messages:
    118
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #21
    broker, Nov 23, 2009 IP
  2. furious

    furious Well-Known Member

    Messages:
    92
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    151
    As Seller:
    100% - 0
    As Buyer:
    100% - 10
    #22
    ok i placed the code on very top. this is how it looked in the index output source..

    {php}
    if (isset($_GET['ref'])) {
    echo "<script>window.location.replace(\"http://www.vids.net\")</script>";
    }
    {/php}
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>


    however i get this error msg on the top of the page and it didnt redirect.

    {php} if (isset($_GET['ref'])) { echo ""; } {/php}
     
    furious, Nov 23, 2009 IP
  3. furious

    furious Well-Known Member

    Messages:
    92
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    151
    As Seller:
    100% - 0
    As Buyer:
    100% - 10
    #23
    award increased to 40 bucks paypal.
     
    furious, Nov 23, 2009 IP
  4. D-Fraz

    D-Fraz Peon

    Messages:
    234
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #24
    I'm not sure if this is even possible anymore.
    Why don't you go to the cpanel and go to redirects, then enter the URL you want to redirect, and the the url for it to redirect to.

    Tbh, I'd like $20 just for spending a ton of time on this. :rolleyes:
     
    D-Fraz, Nov 23, 2009 IP
  5. furious

    furious Well-Known Member

    Messages:
    92
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    151
    As Seller:
    100% - 0
    As Buyer:
    100% - 10
    #25
    if possible through cpanel it should be possible through htaccess as well.

    dont have cpanel anyway...
     
    furious, Nov 23, 2009 IP
  6. Oyaye

    Oyaye Peon

    Messages:
    56
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #26
    Possible Solutions:

    1. .htaccess

    
    RewriteEngine On
    RewriteRule ^index.php?ref=(.*) / [R=301,L]
    
    HTML:
    2. PHP Code in your Smarty header.tpl file.

    
    {php} if (isset($_GET['ref'])) {
    echo "<script language=\"JavaScript\">window.location.replace(\"http://www.vids.net\")</script>";
    }
    {/php}
    
    HTML:
    try with and without the {literal} braces.

    3. Might be a problem with your server, is it apache, is mod_rewrite installed?

    Thanks and hope this will solve it.

    3.
     
    Oyaye, Nov 24, 2009 IP
  7. pixmania

    pixmania Peon

    Messages:
    229
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #27
    Its just a matter of getting the smarty tags correct, the code is correct etc...try the following... BTW you should be placing this code on a new line after everything else in the header.tpl file, otherwise your tracker script might not connect.

    
    
    {php} if (isset($_GET['ref'])) {
    echo "<script>window.location.replace(\"http://www.vids.net\")</script>";
    }
    {/php}
    
    
    Code (markup):
    You could even go as far as pasting it after the </html> tag in footer.tpl, once its anywhere after your tracker script.
     
    Last edited: Nov 24, 2009
    pixmania, Nov 24, 2009 IP
  8. pixmania

    pixmania Peon

    Messages:
    229
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #28
    I guess nobody got paid for this either ?
     
    pixmania, Nov 25, 2009 IP