apache - .htaccess rewrite to php preprocessor causing delay -




all images, css , js requests site need forced through pre-processor php scripts.

the following partial rule subset in parent .htaccess works css requests:

rewriteengine on rewritebase / ... # if request css file send css preprocessor - block direct access rewriterule ^(.+)\.css$ %{env:ps}%{http_host}/inc/css/css.php?f=$1.css [qsa] ... 

however, process slowed client's browser being given 302 , 301 prior receiving 200 remapped request.

this both time consuming on net (some 50-400ms - worse slow client connections) severely holding page display or causing reflow in case of css requests, and, potential security risk exposing workings of site (existence of pre-processors)

i no apache/.htaccess expert - far it, feel there should way force pre-processing totally on server , not exposed client. have looked @ using other flags [f] , [e] , these seem fail causing 400 response. wish avoid use of mod_proxy pretty hosting company blocks that, , have read somewhere using proxy [pt] flag has serious problems timing , sessions.

is there flag missing? = lack of understanding.

on side issue, unrelated, ran .htaccess file through testing [1]: http://htaccess.madewithlove.be/ find remap above being issued mysite.com/mysite.com/inc/css/css.php?f=any.css instead of mysite.com/inc/css/css.php?f=any.css





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -