Welcome! Log In Create A New Profile

Advanced

Split url and replace headers

Posted by breaks 
Split url and replace headers
August 21, 2010 02:25PM
Hello,

I want split url to letters and finally join it like that :

For example :

Normally : http://example.com/abcdef/qwerty.rar -> /home/something/abcdef/qwerty.rar
I want : http://example.com/abcdef/qwerty.rar -> /home/something/a/b/c/d/e/f/qwerty.rar

User must see normal url (without redirects), and I don't want use python, perl etc. it must works very fast !

And I don't know how to do it with the best result, I have a few conceptions :

1. rewrite module (Is it possible?)
2. own module, but I don't know what is better (ngx_open_file) maybe exist other simpler solve ? (replacing headers in fly?)

Please for any suggestions

Thanks in advance !



Edited 1 time(s). Last edit at 08/21/2010 02:25PM by breaks.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 309
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready