hi
i'm having a framework for php known as jFramework (http://jframework.sbce.ir)
the problem is, this framework controls access to resources through its own URLs, e.g
img.folder1.folder2.myimage.png
which maps to
framework_root/images/folder1/folder2/myimage.png
the same goes with
file....
style...
script...
the redirection goes through the framework application controller which is a PHP code and maps these addressses and then uses header("location : ..."); to redirect to
the resource.
As i've seen, this solution is not quite well, since for every single small resource, two requests should be sent to the server instead of one.
I thought of two workarounds:
1. Use the controller to service the file through file_get_contents or similar.
in this case I've got to take care of MIME types and etc. inside my code, and a lot of more things like resume for downloads and so.
So this options isn't really fit here.
- Use Apache's mod_rewrite to write rules that do the mapping themselves.
I'd rather this, but I'm not quite familiar with how mod_rewrite uses Regular Expressions. I'd appreciate any help i could possibly receive here,
including solutions to my specific problem and mod_rewrite tutorial links THAT contain the solution to my specific problem 😃
thanks and regards