Skip to content

Update static caching rewrite rules for IIS #1361

@duncanmcclean

Description

@duncanmcclean

In #1334, we updated the documentation around static caching rewrite rules to workaround various edge cases with query parameters, live preview and non-GET requests.

The updated rewrite rules essentially work like this:

  • When the request is not a GET request
    • It hits Statamic / index.php to handle the request.
  • When the URL includes the live-preview query parameter
    • It hits Statamic / index.php to handle the request.
  • Otherwise...
    • When the page exists in the cache, serve from the static directory.
    • Otherwise, it hits Statamic / index.php to handle the request.

We didn't update the rewrite rules for IIS in #1334 because we don't have access to an IIS server to test updated rules on. If anyone has access to an IIS server and is able to test & contribute, that'd be great!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions