I have this:
RewriteCond ONLY IF SOME FILES ARE REQUEST FIRST FROM FOLDER1 , THAN FROM FOLDER3, AND THAN FROM FOLDER3 (folder1|folder2|folder3)
RewriteRule ^((?!/folder3/folder4/).*)$ /folder3/folder4/$1 [L,NC]
If someone ask (browser) for some file in folder3 and before that any file wasn't requested from folder1 and folder2 than rewrite will not happen.
If someone ask (browser) for some file in folder3 and before that some file have been requested from folder1 but NOT folder2 than there rewrite will not happen.
If someone ask (browser) for some file in folder3 and before that some file have been requested from folder2 but NOT folder1 than there rewrite will not happen.
In basic - in order to some browser see rewrite file it always have to be done sequenc: 1. some file from folder1 2. some file from folder2 and only than 3. rewrite some file from folder3
No meter from what IP request coming from only another RewriteCond will be above from which browser (ex. netscape,safari). Apache HTTP server always must follow rule folde1 file - folder2 file - only then folder3 file rewrite.
Apache HTTP server and some browser (examp. chrome, mozzila, safari...). When some person ask from some browser for page http://aluminijumskicamci.co.rs/indgo.html - Apache and browser will AUTOMATIC do request-get,post job for all things on that indgo.html page. Chrome browser need to request from Apache for each part in order to be recived (2.jpg from folder1, first.js from folder2, and at the end second.js from folder3 which will only than be rewrite using second.js from folder4). Now, that is how it works and if someone want to type second.js just to see what is in there rewrite will not happend - because "anyfile wasn't before requested from folder1 and folder2" - something like file sequence lock. Always have to request from Apache one file from folder1, then one from folder2 and only than rewrite happend for one file from folder3. But because when you type indgo.html in some browser address line this process happends automatic - that is how works -SO NEVER ANY FILE FROM FOLDER3 THAT IS REQUESTED SEPARETE FROM SOME BROWSER WILL NOT BE REWRITE BECAUSE IT IS NOT "REQUESTED AFTER FOLDER1,2". It will always be out of scheme. Do you understand me? This is a great idea if you understand what I em thinking.
RewiteCond one file from folder1 and one file from folder2 only than if request some file from folder3 RewiteRule ^((?!/folder3/folder4/).*)$ /folder3/folder4/$1 [L,NC]
I make another example I belive more simplified:
http://aluminijumskicamci.co.rs/folder1/first.html
http://aluminijumskicamci.co.rs/folder2/second.html
http://aluminijumskicamci.co.rs/folder3/three.html
http://aluminijumskicamci.co.rs/folder4/three.html
In order to rewrite folder3/three.html from folder4/three.html before that someone should ask for /folder1/first.html and /folder2/second.html
Anubhava is this example better?