This redirection code used for displaying image from mysql table<?php header("Content-type: image/gif"); require_once "connection.php";$id=$_GET['id'];//echo "test". $id; $sql="select mod_image from image where img_id=$id"; $rs=mysql_query($sql) or die (mysql_error()); $row =mysql_fetch_array($rs,MYSQL_BOTH); $data = $row[0]; print $data;?>
RewriteCond %{REQUEST_URI} ^/images/(.*)\.gif RewriteRule ^images/(.*).gif ./print-image.php?id=$1 [L]
|