![]() |
How to use X-Sendfile or X-Accel-Redirect in LiteSpeed 4.1.13
Dear Staff,
I've installed LSW 4.1.13 but i have a question is: How to use X-Sendfile or X-Accel-Redirect? I've read your wiki at http://www.litespeedtech.com/support...ernal_redirect, and i try with code: PHP Code:
EX: My domain is: http://xinh.im, and direct download org file is http://xinh.im/HOT_GAME.jar , php file X-Sendfile is: http://xinh.im/t.php, when i download with http://xinh.im/t.php it response file is empty. Please help me, |
according to http://www.litespeedtech.com/support...ernal_redirect, should be
PHP Code:
|
Quote:
But if don't have content type, it is error. |
my local tests shows
PHP Code:
accessing domain.com/t.php is same to access domain.com/HOT_GAME.jar directly. my tests also shows header("Content-type: application/java-archive"); will be ignored. however, since the built-in MIME is "application/java-archive", so it does have a MIME type. you can simply test it with "curl -I domain.com/t.php" on a linux terminal. |
Quote:
Thank you so much! |
Dear NiteWave,
I have a question, please help me. I see at http://www.litespeedtech.com/support...ernal_redirect how to Protect folder, but i think i don't understand how to protect all file, folder & subfolder. EX: I have http://domain.com/data/subfolder/file.mp3 php file download is http://domain.com/dl.php So, How to protect with .htaccess ? Here is my .htaccess Code:
RewriteEngine On |
there are 2 kinds of rewrite rules: per directory and per server.
the one you post is per server rule. in .htaccess, should use per directory. in this case, please try following: Code:
RewriteEngine On |
| All times are GMT -7. The time now is 03:17 PM. |