He estado desarrollando una pagina para la subida y descarga de archivos y no habia tenido problemas hasta ahora con el archivo
"upload.php" y el problema esta en que al generar el enlace corto para poder descargar el archivo este no me redirecciona a la pagina orginal que es la que contiene el enlace original que es demasiado largo y que por esa razon decidi cambiarlo con el acortador pero al ponerl una url me lleva a la pagina de error 404.
espero que puedan ayudarme con este problema y de ante mano muchas gracias
Estos son los datos de mi script y mi .htaccess
upload.php<!DOCTYPE html>
<html>
<head>
<?php
$dir="files/";
$dpath=$dir.$_FILES['file'] ['name'];
@copy($_FILES['file'] ['tmp_name'],$dpath);
$fbrowse=$_FILES['file'] ['name'];
$fname=$_FILES['file'] ['name'];
$fsize = $_FILES['file'] ['size'];
$ftype = $_FILES['file'] ['type'];
mysql_query("INSERT INTO xxxxxxx (FILE,FILENAME,SIZE,TYPE,URL) VALUES('$fbrowse','$fname','$fsize','$ftype','http://xxxxxxxcom/files/downloadfile.php?file=$fbrowse&ID=$id')",$connect); /////////////////////////////////////
mysql_query("INSERT INTO sh.urls (url, id) VALUES ('".$_POST['sh_url']."','".$mid."')"); $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'); $mid = "".$array[rand(0, 34)]."".$array[rand(0, 34)]."".$array[rand(0, 34)]."".$array[rand(0, 34)]."".$array[rand(0, 34)].""; //////////////////////////////////
if($_FILES['file'] ['name'] > 1024)
{
echo "The maximum file size is:1GB";
}
$link = "http://xxxxxxx/files/downloadfile.php";
$url_ID = "$link?file=$fbrowse&ID=$id";
?>
<link rel="shortcut icon" href="http:/xxxxxxx"/>
<title>Uploaded file info</title>
<link rel="stylesheet" href="http://xxxxxxx" />
</head>
<body>
<center><a href="http://xxxxxxx"><img src="http://xxxxxxx/content/logo.png" title="xxxxxxx" /></a></center>
<center>
<ul id="menucontent">
<li><a href="http://xxxxxx.com/">Home</a></li>
<li><a href="http://xxxxxx.com">Buy Premium</a></li>
<li><a href="http://xxxxxx.com">Register</a></li>
<li><a href="http://xxxxxx.com">Login</a></li>
<li><a href="http://xxxxxx.com">Contact Us</a></li>
</ul>
</center>
<div class="uploadcontent">
<label style="position:absolute; top:10px; left:5px; font-family:Century Schoolbook; font-size:14px;">Filename:</label>
<label style="position:absolute; top:10px; left:70px;">
<?php
$fbrowse=$_FILES['file'] ['name'];
echo $fbrowse?>
</label>
<br />
<label style="position:absolute; top:50px; left:7px; font-family:Century Schoolbook; font-size:14px;">Url:</label>
<input type="text" class="fileurl" name="sh_url" onClick="this.select()" size="47" value="<?
$link = "http://xxxxxx.com/files/downloadfile.php";
$url_ID = "$link?file=$fbrowse&ID=$id";
$s_url="http://".$_SERVER['SERVER_NAME']."/files/download.php";
$muID="$s_url&ID$mid";
echo $muID;
<input type="submit" value="Download File" class="vdownload">
</div>
</body>
</html>
php_value display_errors On
php_flag magic_quotes 1
php_flag magic_quotes_gpc 1
php_value mbstring.http_input auto
php_value date.timezone America/New_York
RewriteRule ^([0-9a-zA-Z_-]{6})$ files/download.php?u=$1 [L]
ErrorDocument 404: "The request page doesn't exists in this server."
como detalle dejo tambien la url del enlace acortado que me genera.
http://xxxxxx.net/legnjSaludos.