Activity Stream
48,167 MEMBERS
62098 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 4 of 4
  1.     
    #1
    Member

    Exclamation Redirect url compatible with download managers

    Hey guys, I'm working on a custom link shortening, similar to tinyurl. Is made in php
    My problem is that I do the redirect does not support download managers.
    When I add the short link to any download manager, the long url is not recognized.
    This is how I do the redirect:


    .htaccess:
    PHP Code: 
    RewriteEngine On
    RewriteRule 
    ^([0-9a-zA-Z]+)$ index.php?id=$
    index.php:
    PHP Code: 
    <?php
        
    //$url ; get long url from database based in id
        
    $url 'http://www.megaupload.com/?d=H4N9E047';
        
    header"HTTP/1.1 302 Found" );
        
    header'Location: '.$url.''  );
        exit;
    ?>
    I've also tried as follows:
    index.php:
    PHP Code: 
    <?php
    //$url ; get long url from database based in id
    $url 'http://www.megaupload.com/?d=H4N9E047';
    header"HTTP/1.1 301 Moved Permanently" );
    header'Location: '.$url.''  );
    exit;
    ?>
    any idea?
    Thanks for your time.
    Nan0 Reviewed by Nan0 on . Redirect url compatible with download managers Hey guys, I'm working on a custom link shortening, similar to tinyurl. Is made in php My problem is that I do the redirect does not support download managers. When I add the short link to any download manager, the long url is not recognized. This is how I do the redirect: .htaccess: RewriteEngine On RewriteRule ^(+)$ index.php?id=$1 index.php: <?php Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Thread moved to Development Area, next time please post it in the right forum. Thanks!

  4.     
    #3
    Member
    Sorry about that

  5.     
    #4
    Member
    Your php code is fine.
    Test your response header by calling the url with curl

    Code: 
    curl -I http://your.url

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Making Vb theme IE compatible
    By saini in forum Web Development Area
    Replies: 9
    Last Post: 11th May 2012, 09:42 AM
  2. Hiring Sales Operators/Managers for a web hosting firm.
    By Glenn in forum Completed Transactions
    Replies: 15
    Last Post: 5th Jan 2012, 05:49 PM
  3. redirect to home page when download attachment
    By bluedevil in forum vBulletin
    Replies: 3
    Last Post: 20th Aug 2011, 07:37 AM
  4. phpBB 3.0.7 Compatible SEO Mod
    By Spartan in forum phpBB
    Replies: 3
    Last Post: 7th May 2011, 08:19 PM
  5. My Template isn't compatible with IE - Any solution?
    By hatem20 in forum Web Development Area
    Replies: 7
    Last Post: 1st Nov 2010, 12:33 PM

Tags for this Thread

BE SOCIAL