figured this out with using variables location / { index index.php; if ($request_method = POST) { rewrite ^(.*)$ /index.php break; } if (-f $document_root/cache/$uri/index.html) { rewrite (.*) /cache/$1/index.html break; } if (-f $document_root/cache/$uri) { rewrite (by pmcgee - How to...
Hi, I'm having problems with setting up a rewrite. I basically want any POSTs or cache misses to go to index.php My biggest problem is I want to parse an ID from the url and check if it exists in the cache if ($uri ~* "([0-9]+).*") { rewrite ([0-9]+).* /cache/$1.html; break; } not really sure how to check if it existsby pmcgee - How to...