Created
July 2, 2012 11:23
-
-
Save tomer/3032755 to your computer and use it in GitHub Desktop.
rewrite files to download script by extensions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine on | |
RewriteRule ^(.*\.(rar|zip|pdf|tar|gz|iso))$ /~tomer/redirect/download.php?file=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header ('Content-Type: text/plain'); | |
if (isset($_GET['file'])) print ('file = '. $_GET['file']); | |
else print ('No file specified'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PK |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment