79197388

Date: 2024-11-17 14:28:27
Score: 0.5
Natty:
Report link
RewriteEngine On
RewriteRule ^(.*)$ /file.php?q=$1 [NC,L,QSA]

The "file.php" handles authentication and logging of access. after successful authentication , it just sends the same data that was requested.

Also using this in file.php for handling different file types-

$finfo = finfo_open(FILEINFO_MIME_TYPE);
$ext = finfo_file($finfo,$q);
header('Content-Type: '.$ext); 
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Devanshu Goyal