nexcess / magento-turpentine

A Varnish extension for Magento.
GNU General Public License v2.0
519 stars 253 forks source link

issue with sub_recv: lookup never called #1094

Open frangolacci opened 8 years ago

frangolacci commented 8 years ago

Hi, i have a probleme with my default.vcl file generated by the extension (i made no change), in the sub_recv subroutine, the lookup call is never made, indeed, the url never get to validate the test:

\ # check if the request is for part of magento if (req.url ~ "^(/index.php/|/media/|/skin/|/js/)(?:(?:index|litespeed).php/)?")**

So all the url get pass instead of lookup.

EDIT: i found the answer, it's because mod_rewrite is enable and remove index.php from all the url, but how can i make it works so because the url is rewrite to index.php by htaccess by apache so after varnish handle the url.

aricwatson commented 8 years ago

how can i make it works so because the url is rewrite to index.php by htaccess by apache so after varnish handle the url

If I'm understanding the question, you shouldn't need to (now that you've fixed the issue with mod_rewrite) - as long as the requests aren't getting automatically passed by Varnish to apache.