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:
index.php:
I've also tried as follows:
index.php:
any idea?
Thanks for your time.
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:
RewriteEngine On
RewriteRule ^([0-9a-zA-Z]+)$ index.php?id=$1
PHP:
<?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;
?>
index.php:
PHP:
<?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;
?>
Thanks for your time.