Add Nginx Server Rewrite
Bao Tran
I want to add a server rewrite to Nginx:
location / {
try_files /cache/blitz/$http_host/$uri/$args/index.html $uri $uri/ /index.php?$query_string;
}
Currently, do we support adding it using Web configuration?
0
Comments
The way to do that would be with a
rulein yourweb.locationsblock. There’s an example in the docs here:https://docs.platform.sh/configuration/app/web.html#how-can-i-rewrite-an-incoming-request-without-a-redirect
Is there a way to rewrite URLs to static files as well?
For example, I’d like to implement cache-busting by rewriting
I tried the following, but kept getting 404:
@bao-tran did you work out how to achieve this on Platform.sh. We are also looking to set up Blitz caching.
Any help would be greatly appreciated. Thanks.
Please sign in to leave a comment.